matlab 中fprintfclear all; syms xy = (1500-x)*(1+0.0015*x);ezplot(y,[1000,2000]);dydx = diff(y,x);xsh= solve(dydx);ymax=subs(y,x,xsh);ezplot(y,[0 1500]) ;hold on;plot(xsh,ymax,'-ro'); grid on;hold off;fprintf('the best count is %d dollars/n',xsh)运

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/25 23:38:22
matlab 中fprintfclear all; syms xy = (1500-x)*(1+0.0015*x);ezplot(y,[1000,2000]);dydx = diff(y,x);xsh= solve(dydx);ymax=subs(y,x,xsh);ezplot(y,[0 1500]) ;hold on;plot(xsh,ymax,'-ro'); grid on;hold off;fprintf('the best count is %d dollars/n',xsh)运
xAN0E2*Mwp ԅ;%׎l%^ge@1pHYX&qZl4秲2BR`ۍ dFȸFarN&$Qڅm|B YF)kYG(K/Ʈ3ZӢ&un;=rߊ@kA֒V)*+`lt2}WY[sȹuPZ90-%5v\{s3>`ǯi| J.x;2$ GVXґZoȣ[pC=޿m2FP+Ȳ^תpBLiBq<jg'='F+u\j1 if%EܹFn'W=>=jх

matlab 中fprintfclear all; syms xy = (1500-x)*(1+0.0015*x);ezplot(y,[1000,2000]);dydx = diff(y,x);xsh= solve(dydx);ymax=subs(y,x,xsh);ezplot(y,[0 1500]) ;hold on;plot(xsh,ymax,'-ro'); grid on;hold off;fprintf('the best count is %d dollars/n',xsh)运
matlab 中fprintf
clear all;
syms x
y = (1500-x)*(1+0.0015*x);
ezplot(y,[1000,2000]);
dydx = diff(y,x);
xsh= solve(dydx);
ymax=subs(y,x,xsh);
ezplot(y,[0 1500]) ;
hold on;
plot(xsh,ymax,'-ro');
grid on;
hold off;
fprintf('the best count is %d dollars/n',xsh)
运行后
Error using ==> fprintf
Function is not defined for 'sym' inputs.
Error in ==> one1 at 13
fprintf('the best count is %d dollars/n',xsh)

matlab 中fprintfclear all; syms xy = (1500-x)*(1+0.0015*x);ezplot(y,[1000,2000]);dydx = diff(y,x);xsh= solve(dydx);ymax=subs(y,x,xsh);ezplot(y,[0 1500]) ;hold on;plot(xsh,ymax,'-ro'); grid on;hold off;fprintf('the best count is %d dollars/n',xsh)运
clear all;
syms x
y = (1500-x)*(1+0.0015*x);
ezplot(y,[1000,2000]);
dydx = diff(y,x);
xsh= solve(dydx);
ymax=subs(y,x,xsh);
ezplot(y,[0 1500]) ;
hold on;
plot(double(xsh),double(ymax),'-ro');
grid on;
hold off;
fprintf('the best count is %s dollars/n',char(xsh))