matla使用问题???

来源:百度知道 编辑:UC知道 时间:2024/05/18 05:31:52
想用matlab画t=y(n)这个函数 的波形,输入以后出现这样的错误,请指教。谢谢!
>> n=1:1:100;
>> t=1/(1/4050*log(n*0.000001/47)+1/298.15)-273.15;
??? Error using ==> mrdivide
Matrix dimensions must agree.

加一个点就行了。

n=1:1:100;
t=1./(1/4050*log(n*0.000001/47)+1/298.15)-273.15
plot(n,t)

结果:
t =

1.0e+005 *

Columns 1 through 12

-0.0127 -0.0147 -0.0163 -0.0178 -0.0191 -0.0204 -0.0217 -0.0230 -0.0242 -0.0255 -0.0268 -0.0281

Columns 13 through 24

-0.0294 -0.0308 -0.0322 -0.0337 -0.0352 -0.0367 -0.0383 -0.0400 -0.0418 -0.0436 -0.0455 -0.0475

Columns 25 through 36

-0.0497 -0.0519 -0.0543 -0.0568 -0.0594 -0.0622 -0.0652 -0.0685 -0.0719 -0.0756 -0.0796 -0.0840

Columns 37 through 48

-0.0887 -0.0939 -0.0995 -0.1058 -0.1127 -0.1204 -0.1290 -0.1388 -0.1499 -0.1627 -0.1775 -0.1950

Columns 49 through 60

-0.2158 -0.2412 -0.2726 -0.3127 -0.3656 -0.4386 -0.5459 -0.7190 -1.0455 -1.8910 -9.3042 3.2495

C