フィルターのクリア

condition check from matfile

2 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2013 年 1 月 2 日
i have wanted to store 'value' and 'text' in a matfile....
value=[1; 2; 3; 4];
text=['J for Java';'M for Matlab';'C for cobol';'F for FORTRAN'];
when i try to save them in one matfile error is coming... i tried like this
save MatFilename value text
i wanted to save these values in a matfile... then i have a variable.... if the variables value is 3, i need to check whether that value is in the matfile and if it is in 'value' i need to display the third string from the 'text'
  1 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 1 月 2 日
The problem is in your text variable, you can't use vertical concatenation with string with different sizes

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

採用された回答

TAB
TAB 2013 年 1 月 2 日
Use,
save('Filename.mat','value','text')

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 1 月 2 日
text=['J for Java';'M for Matlab';'C for cobol';'F for FORTRAN'];
would not be valid. It attempts to create a character array with different number of characters per row. Use {} instead of []
  1 件のコメント
Elysi Cochin
Elysi Cochin 2013 年 1 月 2 日
thank u all...

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

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by