matlab中的plot函数 错误 Error using ==> mtimes Inner matrix dimensions must agree.想画一个公式的图形如下:plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 05:26:16
matlab中的plot函数 错误 Error using ==> mtimes Inner matrix dimensions must agree.想画一个公式的图形如下:plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*

matlab中的plot函数 错误 Error using ==> mtimes Inner matrix dimensions must agree.想画一个公式的图形如下:plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*
matlab中的plot函数 错误 Error using ==> mtimes Inner matrix dimensions must agree.
想画一个公式的图形如下:
plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*r*r],'r+:')出现错误 我知道是因为乘号前要放点,但是具体放在哪里不是很清楚,
之前的代码:r=[-0.1:0.1:0.6];
axis=([-0.1 0.6 10 50]);%横纵坐标轴
然后就是这一句:plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*r*r],'r+:')
提示错误:Error using ==> mtimes Inner matrix dimensions must agree.

matlab中的plot函数 错误 Error using ==> mtimes Inner matrix dimensions must agree.想画一个公式的图形如下:plot(r,-40+[0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r]/[0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*
plot(r,-40+(0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r)/(0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*r*r'),'r+:')
上面为什么用中括号?又不是让你写数学公式.
最后那里应该 r*r',矩阵乘法行乘列
不过也许你的本意不想这样.再说吧
或者你是想这样:
plot(r,-40+(0.9*0.043*(1+2.71828)*16-2*0.9*0.043*(-40)+0.9*0.043*34*(1+2.71828)*r)/(0.043*(0.142+0.9-0.142*0.9*0.7)+0.142*0.9*r.*r),'r+:')
r.*r 用点乘!