Plotting values of an equation with linspace

3 次查看(过去 30 天)
For an assignment, I have calculated values of properties of processes with the equation C=P*V^n, and now I have to plot these values using linspace.
For example, at the beginning of process 1, I have a value of P, V, and n in an array. I calculate the value of C at this point. Then I calculate the value of C with the P, V, and n from the end of the state in the array. Now I have to plot the line on a P vs V graph connecting these two points and interpolate it to create a curved line in between. I was going to use linspace to do this, but I'm very confused as to where exactly to use the linspace. I'm not sure where to begin especially since my P, V, and n values are stored in an array.
Do I use it in the calculations? Do I have to use it for every single variable including n, even though I am only plotting P versus V?
I hope this makes sense as I am pretty confused. Thank you!
  1 个评论
Marieke Klijn
Marieke Klijn 2016-9-21
Hi Janell,
Are you sure you are interested in using the linspace function? Using this to connect two points will result in a linear line in your plot, and not in a curved line as you say.
Cheers, Marieke

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by