MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   一个简单的绘图 (https://www.labfans.com/bbs/showthread.php?t=2441)

cyf 2008-04-20 10:53

一个简单的绘图
 
ua=5:5:50;
f=0.0076+0.000056*ua;
w=(0.131*ua.^2)+38800*f;
t=ua*w/3.6;
[ua', t']
plot(ua,t)
xlabel('ua (km//h)'); ylabel('t(kw)');
title(' ua –t');
我需要画ua-t的图,但是有问题,不知道怎么解决!
请帮忙改正,需要正确的做法!
谢谢了,急!

zhangyongnan 2008-04-20 11:12

是不是应该把t=ua*w/3.6;改为t=ua.*w/3.6;啊?试试吧,偶也是新手,:smile:

451616516 2008-04-22 22:43

是这个吗?
 
ua=5:5:50;
f=0.0076+0.000056*ua;
w=(0.131*ua.^2)+38800*f;
t=ua.*w/3.6;
[ua', t']
plot(ua,t)
xlabel('ua (km//h)'); ylabel('t(kw)');
title(' ua –t');

ans =

1.0e+004 *

0.0005 0.0429
0.0010 0.0916
0.0015 0.1487
0.0020 0.2171
0.0025 0.2994
0.0030 0.3983
0.0035 0.5166
0.0040 0.6571
0.0045 0.8224
0.0050 1.0153


所有时间均为北京时间。现在的时间是 11:20

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.