condition check from matfile
显示 更早的评论
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
2013-1-2
The problem is in your text variable, you can't use vertical concatenation with string with different sizes
采纳的回答
更多回答(1 个)
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 []
类别
在 帮助中心 和 File Exchange 中查找有关 Write Fortran Programs to Read MAT File Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!