Difficulty in storing output in a cell array
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have 3 data matrices (Flow, RowID, and nyears) and need to estimate maximum flow for each year.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148716/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148719/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148721/image.bmp)
The code I developed is below.
Qmax=zeros(max(nyears),length(csvFiles));
for iz=1:1:nyears(5)
for jl=1:1:5
Qmax(iz,jl)=max(Flow{1,jl}([RowID{1,jl}(iz,2):RowID{1,jl}(iz,3)],:));
end
end
The output Qmax is shown below. But, I want to store the output (Qmax) in a cell or double array so the rows in 1st column of Qmax be 95, 2nd column 47, and so on the last column but my code does not do it.
Can somebody guide me?
Thanks in adavance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/148726/image.bmp)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!