Technical discussion about Matlab and issues related to Digital Signal Processing.
Hello to everybody over there, I would like to generate name of files in a cycle , for example for j=1:1:ELEMENTS the name of the variable is the type in concatenetion 'M'+j I've used nome=['M' int2str(2)] and it works for generating M2, but to make things difficult I would like to put this value M2 in a vector like this one NOME(1)=nome but the message I receive is: ??? In an assignment A(I) = B, the number of elements in B and I must be the same. what I made wrong? Sorry to bother you but I'm just beginning to use this software and I'm dealing with finite element analysis for truss. Thank you very much in adavance for any kind of help. Best wishes, Micro
Hey, first I would suggest searching the archive I think there is something like this out there. But you can do that NEXT time. For now this seems to work: F_beg = 'b'; % The letter or phrase the file starts with for i=1:8 load([F_beg,num2str(i),'.log']) % loads file b1.log to b8.log end Hope that Helped Hello to everybody over there, > >I would like to generate name of files in a cycle , for example > >for j=1:1:ELEMENTS > >the name of the variable is the type in concatenetion 'M'+j > >I've used >nome=['M' int2str(2)] and it works for generating M2, but to make >things difficult I would like to put this value M2 in a vector like >this one >NOME(1)=nome >but the message I receive is: >??? In an assignment A(I) = B, the number of elements in B and > I must be the same. >what I made wrong? >Sorry to bother you but I'm just beginning to use this software and >I'm dealing with finite element analysis for truss. >Thank you very much in adavance for any kind of help. >Best wishes, >Micro >