"Vectors must be same length" Please help with plotting!
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Stenila Simon
el 30 de Ag. de 2018
Respondida: Cesar Antonio Lopez Segura
el 30 de Ag. de 2018
I'm trying to plot the following and it will not allow me to, because apparently the vectors are not the same length. What am I missing?
h = [0:1:11];
for i = 1:length(h);
T(i) = To - (6*h(i));
end
plot(h,T)
1 comentario
Respuestas (1)
Cesar Antonio Lopez Segura
el 30 de Ag. de 2018
Hi,
What is the value of 'To'?
Is 'To' a scalar o vector?
The following code has not errors:
To = 0;
h = [0:1:11];
for i = 1:length(h);
T(i) = To - (6*h(i));
end
plot(h,T)
0 comentarios
Ver también
Categorías
Más información sobre Scatter Plots 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!