From: dpb on 6 Jul 2010 17:28 Ali Culp wrote: .... > the mean of all of the individual elements of x (that way it will be a > scalar and then > will work)... can this be done? xm = mean(x(:)); --
From: Walter Roberson on 6 Jul 2010 17:29 Ali Culp wrote: > The problem now is that when using > A > B, A and B must be the same size and the mean(x) and std(x) do not > have the same dimensions as x itself. No, when you use A > B then either the two matrices must be the same size *or* one of them can be a scalar value. mean(x) and std(x) are scalar values provided that x is a vector. You mention that you have a "matrix". If you mean that as a 2 dimensional array, then to get the appropriate scalar values, use mean(x(:)) and std(x(:))
First
|
Prev
|
Pages: 1 2 Prev: Problems with Legend Box Next: Specify (state dependent) mass matrix in Simulink S-function |