how do i correct a Vector Function indices compatibility Error?

12 visualizaciones (últimos 30 días)
Hi, i keep getting this error "Unable to perform assignment because the indices on the left side are not compatible
with the size of the right side" when i run the following, how can i fix it?
t = 0:0.1:10;
n = length(t);
for i = 1:n
F(i)= t
end

Respuesta aceptada

Matt J
Matt J el 15 de Ag. de 2021
Did you mean,
for i = 1:n
F(i)= t(i);
end

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by