Why the error with eval does appear in the code?
Afficher commentaires plus anciens
hi all,
The file names are in the format of JDA00912.ohh which contains: JDA0, 0, years 9-13, months 1-12 For the single numbers, it should be 01,02,03,...etc And for the year 2009 it should be 09, the others= 10,11,12,13
I wrote the following code by using eval function and the following error was appearing clear
FN1 = 'JDA0';
z = '0';
yr = 10;
mn = 12;
yr = 9:13;
ext = '.ohh';
FN2 = [FN1'; num2str(yr(1,:))'; z'; num2str(mn(1,:))'; ext']';
eval (['fid=fopen(', FN2, ')']);
how can I solve this problem?
Error: Unexpected MATLAB expression.
Thank you.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Debugging and Improving Code dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!