plot help

1 次查看(过去 30 天)
Nasir Qazi
Nasir Qazi 2012-3-6
J(2,:) = bublept();
O(1,:) = bublept();
plot(rslt(2,:),rslt(1,:),'-- ks','MarkerFaceColor','r','LineSmoothing','on')
hold all
plot(J(2,:),O(1,:),'-- ks','MarkerFaceColor','r','LineSmoothing','on')
xlim([100 280])
ylim([0 8])
xlabel('Temperature in K')
ylabel('Pressure in MPa')
title('Dew Point-curve')
% I am trying to plot this , the first one has no problem the 2nd one does have a problem and unable to plot , please note J(2,:) & O(1,:) is located in another function file (bublept). could you tell me why it is not plotting?

回答(1 个)

Walter Roberson
Walter Roberson 2012-3-6
Unless your function bublept() has magic to know how many times it has been called, or unless it creates random values, then
J(2,:) = bublept();
O(1,:) = bublept();
would be assigning the same output to J(2,:) as to O(1,:) . Then when one was plotted against the other, you would get a straight line.
If you are thinking that the syntax
J(2,:) = bublept();
means that MATLAB should look inside the function bublept and find an assignment there to a variable named "J" and that it should copy that J value out to the calling function -- if that is what you are thinking, then functions do not work anything like that!
  1 个评论
Nasir Qazi
Nasir Qazi 2012-3-6
how do I get the values then ? how do i reach to bublept and get these values . ?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by