Subscripted assignment dimension mismatch.

2 ビュー (過去 30 日間)
saravanakumar D
saravanakumar D 2014 年 1 月 20 日
コメント済み: Bruno Pop-Stefanov 2014 年 1 月 20 日
I am trying to store the string in to one array in if else state ment. i get this error
Subscripted assignment dimension mismatch.
Error in connect (line 68) blob(i)='rectangle';

採用された回答

Bruno Pop-Stefanov
Bruno Pop-Stefanov 2014 年 1 月 20 日
This error means that you are trying to assign to an element of vector blob (size 1x1) a vector a size 1x9. That happens because in MATLAB, a string is a vector of characters: 'rectangle' is a vector of size 1x9, but blob(i) has size 1x1.
Are you trying to store strings of various sizes in the variable blob? What do you want to do when storing strings in a vector?
  4 件のコメント
saravanakumar D
saravanakumar D 2014 年 1 月 20 日
but i get this error
Cell contents assignment to a non-cell array object.
Error in connect (line 68) blob{i}='Rectangle';
Bruno Pop-Stefanov
Bruno Pop-Stefanov 2014 年 1 月 20 日
Do you use blob somewhere else? Do you mind showing your code where you use blob?

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by