Re: A(I)=B
- From: "Gule Saman" <gulesaman@xxxxxxxxx>
- Date: Mon, 16 Mar 2009 19:12:03 +0000 (UTC)
i have tried this but it gives the same error again. I have ten intensity values that i pass into this function to find the mean.
"Vince Petaccio" <vince@xxxxxxxxxx> wrote in message <gpm68c$a93$1@xxxxxxxxxxxxxxxxxx>...
A(1)=mean(intensity);.
What your command here is saying is that the first value of A should be the mean of your data, intensity.
The error message that you're getting is saying that you're trying to assign more than one value to A(1).
Common sense dictates that the "mean" value is a single value. In MATLAB, though, if intensity is a multi-dimensional cell or vector, you will get more than one value from the "mean" function- one for each ROW.
Try this:
test = zeros(2,2); %Create a 2x2 vector of zeros
testmean = mean(test); %Get the mean value of that vector
testmean = [0,0];
%Your answer is returned as a vector, with a "mean" value for each row in your original vector.
Make sure that your intensity vector is being formed correctly. If so, try making a single vector, containing the values from each row of intensity, and then taking the mean value of that. Or, you can take a "mean of means" by getting the mean value for each of the rows in intensity, then taking the mean of those.
-Vince
- Follow-Ups:
- Re: A(I)=B
- From: us
- Re: A(I)=B
- From: someone
- Re: A(I)=B
- References:
- A(I)=B
- From: Gule Saman
- Re: A(I)=B
- From: Vince Petaccio
- A(I)=B
- Prev by Date: display current date..?
- Next by Date: Re: display current date..?
- Previous by thread: Re: A(I)=B
- Next by thread: Re: A(I)=B
- Index(es):
Relevant Pages
|
Loading