using find function and comparing results
显示 更早的评论
I've been able to create a 3-D cell array with months and wind speeds in different locations. I've then calculated the averages in the perspective locations. Here's where things go over my head (all using the find function)...1, how many months is the wind speed below the average in each location? 2, How many months and which ones was the wind speed in the first location higher than the second? 3, How many months and which ones was the wind speed in first location within ±0.2mph of the second? How can I use the find function to compare results in different arrays? As always, thanks for teaching!
A(:, :, 1) = {'Jan' 'Feb' 'Mar' 'Apr' 'May' 'Jun' 'Jul' 'Aug' 'Sep' 'Oct' 'Nov' 'Dec'};
A(:, :, 2) = {6.7 7.5 8.5 9.5 10.4 10.9 11.2 10.5 9.1 7.6 6.3 6.5};
A(:, :, 3) = {9.0 9.6 9.9 9.4 8.8 8.0 7.3 7.2 7.7 8.6 8.6 8.5};
B = sum([A{:,:,2}])/12;
C = sum([A{:,:,3}])/12;
3 个评论
BlkHoleSun
2017-10-21
BlkHoleSun
2017-10-21
Cedric
2017-10-22
I still highly advise you to understand the answer that I posted 2 hours ago.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!