필터 지우기
필터 지우기

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