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/05/14 20:30:47
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)
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))
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中(:,:,
matlab中,
matlab 中
matlab中( :,
【Matlab】Matlab中如何编写S函数
【Matlab】Matlab中如何编写S函数
Matlab中如何求导?
谁知道matlab中i *
matlab中Y(:,
MATLAB 中syms
MATLAB 中clf
MATLAB 中 Pause
matlab 中size(x,
Matlab中size(A,
matlab中P(:,:,
MATLAB中@是什么意思
matlab中 hold