MATLAB: Condition check from matfile

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'

Best Answer

Use,
save('Filename.mat','value','text')