Problem with Create Matrix

3 ビュー (過去 30 日間)
Dani D
Dani D 2015 年 10 月 27 日
編集済み: Thorsten 2015 年 10 月 27 日
Hello, Why this command doesn't work? FD = [1:10 ; 50:60]

採用された回答

Thorsten
Thorsten 2015 年 10 月 27 日
編集済み: Thorsten 2015 年 10 月 27 日
Because
Error using vertcat
CAT arguments dimensions are not consistent.
You have 10 numbers in the first row, and try to conCAT vertically 11 numbers in the second row. That's not possible in a matrix, all rows must have the same number of columns.
You can use a cell array
FD{1} = 1:10; FD{2} = 50:60;
or you have to change the numbers, like
FD = [1:10; 51:60];
  2 件のコメント
Dani D
Dani D 2015 年 10 月 27 日
Thanks , but i have the below error.
>> FD{1} = 1:10; F{2} = 50:60;
Cell contents assignment to a non-cell array object.
Thorsten
Thorsten 2015 年 10 月 27 日
編集済み: Thorsten 2015 年 10 月 27 日
Use
clear FD
FD{1} = 1:10; FD{2} = 50:60;
and note that the second assignement should be FD{2}, not F (my typo, I corrected it above).

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by