Ask for creating composite curve

4 views (last 30 days)
David Napitupulu
David Napitupulu on 15 Jan 2015
Commented: Geoff Hayes on 16 Jan 2015
how can i construct composite curve for hot stream and cold stream,and than combine both hot stream and cold stream ,the problem is i got 2 value for Y axis it was Ts and Tt and single value for x axis it was enthalpy,when i tried to construct the graph it say "vectors must be the same lenght" .
Thank you

Answers (1)

Geoff Hayes
Geoff Hayes on 16 Jan 2015
David - how are you constructing the graph? What is the line of code that you are using?
If you have two vectors for the y-axis, and one for the x-axis, then why not try the following
% create some example x and y data
x = 1:1:100;
y1 = x.^2;
y2 = -x.^2;
% plot the results: x vs y1, and x vs y2
plot(x,y1,x,y2);
Your error message seems to indicate that you were trying to plot a combination of the two y vectors versus the single x vector (and so they would be of different lengths). Was this the case?
  2 Comments
David Napitupulu
David Napitupulu on 16 Jan 2015
here is the sample of my data
*HE1 HOT Temp in: 169 Temp out 32,00 Enthalpy =76833896,87
*HE1 COLD Temp in 32 Temp out 66 Enthalpy =36396269,14
*HE2 HOT Temp in 121 Temp out 91 Enthalpy =25240831,2
*HE2 COLD Temp in 66 Temp Out 88 Enthalpy =26106113,88
yes,i try to combine two y vectors to single x vector,because in data y i got Temp in Temp out and enthalpy in x axes.
Geoff Hayes
Geoff Hayes on 16 Jan 2015
What is the code that you are using to plot the data?

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!