Indexing data on a grid
I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks.I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. I have a variable VAR with a size of 360 x 180. I also have an index Ind (composed of 1 and 0) on the same size. How do I get a gridded data at the same size of VAR for data points where Ind == 1. Why doesn’t the below work?
V = VAR(Ind);
V turns into a 1-column data, instead of the expected gridded data.
Thanks. indexing MATLAB Answers — New Questions