reshape the dimension of a matrix

1 view (last 30 days)
Shlomit Sharoni
Shlomit Sharoni on 19 Jun 2017
Commented: Shlomit Sharoni on 19 Jun 2017
I have a matrix of 288 x 234 and I want to reshape it to 360 x 180 is it possible? I have nan value in the mat.
Thank you in advance

Answers (1)

Tyler
Tyler on 19 Jun 2017
The simple answer is no, those arrays do not have the same number of elements. But if you can explain why you want to reshape the array, that will get to the root of the problem and help others answer it. If you're trying to get rid of nan values, you can use the isnan command, and after getting rid of those, if the number of elements is the same you could use the reshape function.
  1 Comment
Shlomit Sharoni
Shlomit Sharoni on 19 Jun 2017
Hi, My goal is to compare data from two global models. The resolution of the 1st model is 1 latitude x 1 longitude ( matrix if 360 x 180), it correspond to -90 - (90) latitude and -180-(180) longitude), and the other model have different global resolution 1.25 longitude x 0.75 latitude (matrix of 288 x 234). I would like to compare between the output of the two models and I am looking for the best way to do it.. Thank you

Sign in to comment.

Categories

Find more on Matrices and Arrays 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!