フィルターのクリア

Extract only odd rows in a matrix

12 ビュー (過去 30 日間)
Brilliant Purnawan
Brilliant Purnawan 2021 年 3 月 8 日
回答済み: Matt J 2021 年 3 月 8 日
Hi, how would I modify the following code if I only want to extract the odd rows in the output matrix. The output is generated by ODE45 and I am referring to the third variable. I have already tried to use the matrix indexing in matlab but it's not working. How would I go about this? If my output is given as below?
m = y(:,3);

回答 (1 件)

Matt J
Matt J 2021 年 3 月 8 日
m=y(1:2:end,3);

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by