Plotting [1,n) cell arrays against each other
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi guys,
Iv been writing up a program for estimation of rotor power, however, i need to output a graph plot of thrust coeff against pitch angle. Iv got my results out of a for loop based program as two 1 x n (n is defined as between 15 and 30) cell arrays. Iv used the following code:
graph = plot(EffCT,Theta1);
axis([5 30 1 3]);
set(graph,'Color','red','LineWidth',2)
But it only opens the figure window with no line in sight, and im sure by axis are correctly sized as iv reviewed the arrays. If you could help me out id really appreciate it.
Cheers Mark
2 comentarios
Matt Fig
el 27 de Nov. de 2012
Editada: Matt Fig
el 27 de Nov. de 2012
So EffCT and Thetal are cell arrays? What do the cells look like? Is each cell a single value, like this:
X = num2cell(1:5)
If so, I am surprised that call to plot doesn't error. Please show what these two variables are. Cell arrays (so describe the contents) or doubles?? Maybe even give a small sample for us to look at.
Respuesta aceptada
Matt Fig
el 27 de Nov. de 2012
Editada: Matt Fig
el 27 de Nov. de 2012
Try your code without calling the AXIS function. Judging by your data you do not have cell arrays, you have numeric arrays and you're setting the limits beyond the range of the data.
I.e., try this:
graph = plot(EffCT,Theta1);
% axis([5 30 1 3]);
set(graph,'Color','red','LineWidth',2)
6 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!