Borrar filtros
Borrar filtros

Plotting values of an equation with linspace

1 visualización (últimos 30 días)
Janell Lopez
Janell Lopez el 9 de Sept. de 2016
Comentada: Marieke Klijn el 21 de Sept. de 2016
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 comentario
Marieke Klijn
Marieke Klijn el 21 de Sept. de 2016
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

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by