フィルターのクリア

Create a column vector with elements counting down from 200 to 0 in increments of 5

24 ビュー (過去 30 日間)
Mvana
Mvana 2022 年 8 月 1 日
コメント済み: Stephen23 2023 年 8 月 2 日
I created the vector, C= [200:-5:0] and I git an error that reads, Variable C must have size[41 1]. It is currently of size [1 41]
  1 件のコメント
Stephen23
Stephen23 2023 年 8 月 2 日
Note that the square brackets are completely superfluous. The MATLAB approach is simply:
C= 200:-5:0;

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

回答 (1 件)

Clay Swackhamer
Clay Swackhamer 2022 年 8 月 1 日
Try transposing your output to flip it from a row vector (list of numbers going horizontally) to a column (list of numbers going vertically) like this:
C = C'
  2 件のコメント
Mvana
Mvana 2022 年 8 月 1 日
Thank you so much, it worked out perfectly
Muhammed
Muhammed 2023 年 8 月 2 日
Really helped had the same error
Tx :-)

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

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by