フィルターのクリア

Substract two elements in an array

1 回表示 (過去 30 日間)
Alessandro Ruda
Alessandro Ruda 2022 年 1 月 30 日
編集済み: KSSV 2022 年 1 月 30 日
Dear MatLab comunity,
I have an array of 8 elements i.e.:
X=[5.03690000000000 5.03140000000000 5.02640000000000 5.02520000000000 5.02370000000000 5.02350000000000 5.02300000000000 5.02310000000000]
I want to subtract the first value from the last value and store it in a variable.
How can I do it? It should be pretty simple, I apologize in advance for that.
Best,
Alex

採用された回答

KSSV
KSSV 2022 年 1 月 30 日
編集済み: KSSV 2022 年 1 月 30 日
iwant = X(end)-X(1)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCell Arrays についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by