Why does the track2 function is not working?

2 ビュー (過去 30 日間)
Laia Puyal
Laia Puyal 2024 年 9 月 30 日
コメント済み: Star Strider 2024 年 9 月 30 日
Hey community
I am using the R2023b version and the track2 function does not respond correctly.
It should work as:[lati , loni] = track2(lat1,lon1,lat2,lon2,number);
This last numbers is automatically 100, however if I change it, matlab still uses 100. Even if I try with 1, or 1000.

採用された回答

Star Strider
Star Strider 2024 年 9 月 30 日
Try this —
[lati , loni] = track2(lat1,lon1,lat2,lon2,[],[],number);
MATLAB function arguments are positional (except for the name-value pair arguments), so intermediate argument values need to be ‘empty’ to use the default values.
Using an example from the documentation —
number = 250;
[latgc,longc] = track2(40.71,-74.01,48.86,2.35,[],[],number);
latsize = size(latgc)
latsize = 1×2
250 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
lonsize = size(longc)
lonsize = 1×2
250 1
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
.
  2 件のコメント
Laia Puyal
Laia Puyal 2024 年 9 月 30 日
It was it!!! Thank you very much!!!
Star Strider
Star Strider 2024 年 9 月 30 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by