plot help

2 views (last 30 days)
Nasir Qazi
Nasir Qazi on 6 Mar 2012
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?

Answers (1)

Walter Roberson
Walter Roberson on 6 Mar 2012
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 Comment
Nasir Qazi
Nasir Qazi on 6 Mar 2012
how do I get the values then ? how do i reach to bublept and get these values . ?

Sign in to comment.

Categories

Find more on Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!