필터 지우기
필터 지우기

Problem with Create Matrix

조회 수: 2 (최근 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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by