how do i correct a Vector Function indices compatibility Error?

12 次查看(过去 30 天)
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

采纳的回答

Matt J
Matt J 2021-8-15
Did you mean,
for i = 1:n
F(i)= t(i);
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by