In the statement
u = m * c;
MATLAB tries for 'matrix multiplication'.Marix multiplication is possible when a matrix of dimension (m * n)[rows = m,columns = n] is multiplied with another matrix of dimension (n * p).The dimension of answer matrix will be (m * p).Or otherwise,one of two matrices in matrix multiplication should contain just a single value(scalar matrix). Here,neither 'm' nor 'c' is single-valued. Or if you want elementwise multiplication,you can use
u = m. * c;
N.B. : You can use inbuilt value for pi using 'pi'.
Hi Ruqayya —
This is the line that is throwing the error:
where both ‘m’ and ‘c’ are (1x1000) double vectors.
Two possibilities present themselves, since I don’t know what you want:
Your call as to what you want ‘u’ to be. One of these should work in your application. Neither of them will throw the error.