Iteration (Column times Column)
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
Hi, I have sample data that have four columns which is Latitude, Longitude, U component and V Component

I want to compute the absolute wind speed by referring to this coding
f = 'uvcomponent.txt';
lat= f(:,1);
lon= f(:,2);
u = f(:,3);
v = f(:,4);
interval=0.25;
%set area limit
minlat=0+ (interval);
maxlat=14- (interval);
minlon=95 + (interval);
maxlon=126 - (interval);
i1=minlat:interval:maxlat;
j=minlon:interval:maxlon;
%calculate the absolute wind speed
ws=sqrt((u^2)+(v^2))
Thus, I need some advice on how to perform this coding.
1 个评论
Stephen23
2019-2-21
ws = sqrt((u.^2)+(v.^2))
^ ^
To use MATLAB you must learn the difference between matrix and array operations.
回答(1 个)
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!