Z- score of a multidimensional array

11 views (last 30 days)
desert_scientist90
desert_scientist90 on 23 Oct 2019
Edited: Matt J on 23 Oct 2019
Hi I am new to matlab. I have a data set on a grid at 0.5 with x 141 y, 71 and x38. I am trying to get z scores for this multidimensional array. I used the code z=zscore(x) to get the z-scores which I got on the shape of 1*71*38. I want to end with a z-score per year instead of 2,698 values. Is there anyway I can get this?
Thanks in advance for your help.
  1 Comment
Matt J
Matt J on 23 Oct 2019
Edited: Matt J on 23 Oct 2019
If you started with an array of size 141x71x38, then zscore should have produced an array the same size,
>> X=rand(141,71,38);
>> Z=zscore(X);
>> whos X Z
Name Size Bytes Class Attributes
X 141x71x38 3043344 double
Z 141x71x38 3043344 double
I'm afraid I don't understand what your attachments mean either. matlab-z.mat contains what you got and yearz1.mat contains what you want to get? Why is year_z1 of dimensions 38x72 instead of 38x71? And which dimension of your arrays represent years?

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!