我正在尝试绘制函数图Fh_1
,但看起来 ezunits 正在引起问题。当我输入 x 值时,我可以从中得到结果。但是绘图不起作用,即使使用 Dimensionly() 也不行。我怎样才能让它工作?
(%i2) kill(all); load(ezunits); g2r(x):= x*%pi/180;
(%o0) done
(%o1) "C:/maxima-5.44.0/share/maxima/5.44.0/share/ezunits/ezunits.mac"
(%o2) g2r(x):=(x*%pi)/180
1 variables
(%i3) rho: atan(rat(0.35));
rat: replaced 0.35 by 7/20 = 0.35
(rho) atan(7/20)
(%i4) L_FPzuLH: 110`mm;
(L_FPzuLH) 110 ` mm
(%i5) L_Backe: 33`mm;
(L_Backe) 33 ` mm
(%i6) L_HebelLinks: 81`mm;
(L_HebelLinks) 81 ` mm
2 function
(%i7) Fh_1(D_Platte):= L_HebelLinks*sin(g2r(90)-(g2r(90)-(acos((L_FPzuLH-D_Platte-L_Backe)/L_HebelLinks)))-rho);
(%o7) Fh_1(D_Platte):=L_HebelLinks*
sin(g2r(90)-(g2r(90)-acos((L_FPzuLH-D_Platte-L_Backe)/L_HebelLinks))-rho)
3 this works
(%i9) Fh_1(31`mm); float(%);
(%o8) 81*sin(acos(46/81)-atan(7/20)) ` mm
(%o9) 47.73170350716926 ` mm
4 but not this
(%i10) dimensionally(plot2d(Fh_1(x), [x,5`mm,55`mm]));
plotting: range must be of the form [variable, min, max]; found:
[x,5*g1498,55*g1498]
-- an error. To debug this try: debugmode(true);
为千里马粘贴:
/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [ Created with wxMaxima version 21.02.0 ] */
/* [wxMaxima: input start ] */
kill(all); load(ezunits); g2r(x):= x*%pi/180;
/* [wxMaxima: input end ] */
/* [wxMaxima: section start ]
variables
[wxMaxima: section end ] */
/* [wxMaxima: input start ] */
rho: atan(rat(0.35));
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
L_FPzuLH: 110`mm;
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
L_Backe: 33`mm;
/* [wxMaxima: input end ] */
/* [wxMaxima: input start ] */
L_HebelLinks: 81`mm;
/* [wxMaxima: input end ] */
/* [wxMaxima: section start ]
function
[wxMaxima: section end ] */
/* [wxMaxima: input start ] */
Fh_1(D_Platte):= L_HebelLinks*sin(g2r(90)-(g2r(90)-(acos((L_FPzuLH-D_Platte-L_Backe)/L_HebelLinks)))-rho);
/* [wxMaxima: input end ] */
/* [wxMaxima: section start ]
this works
[wxMaxima: section end ] */
/* [wxMaxima: input start ] */
Fh_1(31`mm); float(%);
/* [wxMaxima: input end ] */
/* [wxMaxima: section start ]
but not this
[wxMaxima: section end ] */
/* [wxMaxima: input start ] */
dimensionally(plot2d(Fh_1(x), [x,5`mm,55`mm]));
/* [wxMaxima: input end ] */
/* Old versions of Maxima abort on loading files that end in a comment. */
"Created with wxMaxima 21.02.0"$