I have an error in this line Total = [Total; S.']; but as for my requirment that is right way any way to avoid this error
vertcat CAT arguments dimensions are not consistent.
1 view (last 30 days)
Show older comments
I am implementing a code and exactly at the last loop after running for two iterations I have this error. I know this error is due to inconsistency in my arrays but i dont know where is the actual problem in the loop this is my code...
for tau = 1 : y
for k = 0:nw-1
S(1:nw,tau)= (((output(tau : tau + nw -1) - x(tau)).*exp(2*pi*k/nw))...
+ (x(nw-1+ tau).*exp(-2*pi*k*(nw-1)/nw)));
S = S(1:end/2);
end
Total = [Total; S.'];
end
Answers (2)
Jan
on 31 Jan 2012
Is Total defined before the loops? If so, with which size?
It is strange, that you define S as a matrix at first and crop it to a vector in the next line. Are you sure?
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!