Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | programming in matlab

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

programming in matlab - labmatart - Aug 14 8:46:13 2008



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


(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: programming in matlab - chef...@gmail.com - Aug 20 21:07:17 2008

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
>



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )