problem with plot command

4 ビュー (過去 30 日間)
Amey
Amey 2016 年 5 月 2 日
回答済み: Amey 2016 年 5 月 2 日
my plot command is giving me a y axis with single value throughout & it makes plot look weird. axis command doesnt woek as well because it is showing only one entry from the legend in the graph. please see the screenshot attached.
P1=P(1:30,1);
P2=P(1:30,6);
P3=P(1:30,11);
xx=linspace(50,2950,30);
figure(1)
plot(xx,P1,'b-*', xx,P2,'r--',xx,P3,'g-o');
%axis([0 3000 0 3000]);
xlabel('Distance');
ylabel('Pressure');
legend('t=0','t=50','t=100');
title('leak-proof test');
<<
>>
  1 件のコメント
CS Researcher
CS Researcher 2016 年 5 月 2 日
Can you share the variable P?

サインインしてコメントする。

採用された回答

Amey
Amey 2016 年 5 月 2 日
I got the solution for this problem. I created variable i twice by mistake & it was ruining my output. it messed up all my loops in the program. now the problem is resolved. thanks!

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by