Hi everyone! I need your help.
1 view (last 30 days)
Show older comments
Engdaw Chane on 13 Feb 2018
I have the following matrices:
Mat_A=194 x 201 x 360 rows, columns and monthly value respectively
Mat_B= 194 x 201 x 30 rows, columns and seasonal value respectively
I need to divide selected monthly values (from April to September) from Mat_A by Mat_B (seasonal value).
I tried the following:
for h =1:length(Mat_A)
for k= Mat_B(:,:,1:36)
Mat_C(h)= Mat_A(:,:,April:Sept)./ Mat_B(:,:,:)
I tried different ways, and couldn’t fix it. For this code, I am getting “Subscript indices must either be real positive integers or logicals.” error. Thank you.
Birdman on 13 Feb 2018
Adapt this into your problem:
More Answers (0)
Find more on Matrix Indexing 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!