フィルターのクリア

How do I cut a vector from the end of a vector of a certain length and keep it in an independent vector

22 ビュー (過去 30 日間)
How do I cut a vector from the end of a vector of a certain length and keep it in an independent vector
A=[1 2 3 4 5 6 7 8 9]
result
B=[1 2 3 4 5 6 7]
C=[8 9]

採用された回答

Chunru
Chunru 2021 年 7 月 31 日
A=[1 2 3 4 5 6 7 8 9]
A = 1×9
1 2 3 4 5 6 7 8 9
cutpoint = 7;
B=A(1:cutpoint)
B = 1×7
1 2 3 4 5 6 7
C=A(cutpoint+1:end)
C = 1×2
8 9
  7 件のコメント
Matt J
Matt J 2021 年 7 月 31 日
@reta jon you should Accept-click @Chunru's answer, since it solved your issue.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by