作业帮 > 综合 > 作业

这是我用matlab画的图,为什么会出现两条线?

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/08 11:53:33
这是我用matlab画的图,为什么会出现两条线?

我的程序如下:
clear all;
P=[0.036,0.036,0.036,0.037,0.040,0.038,0.044,0.051,0.063,0.080,0.102,0.128,0.163,0.211,0.262,0.321,0.386,0.458,0.547,0.627,0.723,0.815,0.916,1.029];
I=[0.072,0.036,0.024,0.0185,0.016,0.012667,0.012571,0.01275,0.014,0.016,0.018545,0.021333,0.025077,0.030143,0.034933,0.040125,0.045412,0.050889,0.057579,0.0627,0.068857,0.074091,0.079652,0.08575];
plot(I,P);
hold on;
xlabel('I/mA');
ylabel('P/uW');
title('输出光功率P与电流I特性曲线');
你的对应点本来就是这样的啊.如果图形不对就是你的输入算错了.
plot(I,P,‘*-’);
你看一下你的点都对应在哪里