I keep getting A(I) = B, the number of elements in B and I must be the same. matlab error
1 view (last 30 days)
In an assignment A(I) = B, the number of elements in B and I must be the same
This is the error keep popping. Any experts who can help me identify where I went wrong?
Image Analyst on 29 Nov 2013
Is it your intention that p should be a vector, like you said here: p=zeros(length(detsq),1);
or is it your intention that p should be a scalar like you say here: p=1000/t*60
If you do this: pulse(i)=p; then p must be a scalar. Though I'm just guessing at the line of code producing the error because, for some strange reason, you left out that crucial part of the error message that identifies the line of code that caused the error.