Iteration (Column times Column)

Hi, I have sample data that have four columns which is Latitude, Longitude, U component and V Component
Capture.PNG
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
Stephen23 2019 年 2 月 21 日
ws = sqrt((u.^2)+(v.^2))
^ ^
To use MATLAB you must learn the difference between matrix and array operations.

回答 (1 件)

madhan ravi
madhan ravi 2019 年 2 月 21 日

0 投票

.^

この質問は閉じられています。

タグ

質問済み:

zzm
2019 年 2 月 21 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by