want to compute zero mean for whole matrix and then some scaling to this ?

I have a matrix of 1024*966 for this matrix I want to compute zero mean and want to scale after this and want to improve result by doing this but how can I? Final result will be nearly equal result to matrix of 1024*966.
for zero mean I got
X=AC1(:,1);
Y=X-mean(X(:,:));
For scaling I don't know?

1 Comment

I'm sorry, but I don't think the explanation is what you want is very clear. Can you give a very small example (maybe 3x3?) that shows what you want to do?

Sign in to comment.

Answers (1)

You should have edited your original question, or added a comment to my answer there.
Why do you call it zero mean? That's not standard terminology. Why are you taking only the left column of 2D image AC1? That doesn't do the whole matrix, just the left column. Anyway, you can do
Y = double(AC1) - mean2(AC1); % Use mean(AC1(:)) if you don't have the IPT.
For scaling just multiply by some scaling factor, like 42 or whatever - I'm not sure why that part is confusing to you.

6 Comments

What is AC1 and AC2?
I have three matrix of the dimension 1024*966 and want to compute area of parabola using 1st pixel value from 1st matrix, 2nd point from second matrix and then 3rd pixel from third matrix , these three point form parabola then after want to zero mean and some scaling after that?
for zero mean
Sorry - I meant AC1, what you called your 2D matrix.
So you can stack these images in the Z direction with cat(3, m1, m2, m3) then you can scan it pixel by pixel getting the 3 values in the z direction and using polyfit to get a parabola going through those 3 points. They have no area. A parabola does not have an area - it does not.
parabola under first and third matrix for each pixel will form and i want to compute that area how can I and again on this computed area want to find out zero mean?
I have no idea what you're trying to say. You said the parabola was determined by the value (in the same location) from the three matrices. So what do you mean by the "parabola under"? What is under what???
mean parabola is formed by three points (suppose on x axis values are 6 7 8 and on y axis form 1.2 1.3 1.14 ) and x values are fixed and three y represents three pixels and three pixels values are coming from three different text files pixel wise then after trying to find zero mean ?
I still don't understand. Did you switch terminology on us? Is your new x the old z (the plane number, or 1,2,3) and the new y is the pixel value at that (x,y) location in the three matrices?
Since you've lost me, why don't you just use polyfit() to get your parabola?
coefficients = polyfit(x, y, 2);

Sign in to comment.

Categories

Find more on Images in Help Center and File Exchange

Asked:

RS
on 29 Aug 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!