0
$\begingroup$

I am trying to compute the Morlet wavelet transform (cmor) of a signal, but I have to do it several times with different parameters Fb and Fc. Is there a way to automate it? For example, I have to do the transform with: cmor1-1, cmor1-2, ..., cmor1-10. I created a vector Fc=1:10, but I'm not able to replace Fc parameter into cmor1-Fc. I tried this way:

morlet='cmor1-Fc'
for i=1:10
morlet(1,8:9)=i;
end

but it doesn't work (there appear squares instead of the number, and it would properly work only for 2-digit numbers. Thank you

$\endgroup$

closed as off-topic by MBaz, Matt L., A_A, Laurent Duval, Peter K. Dec 5 '16 at 2:46

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "General programming questions are off-topic here, but can be asked on Stack Overflow." – MBaz, Matt L., A_A, Peter K.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ Can you please provide a little bit more information about your problem? Why do you have to do multiple transforms via multiple wavelets? In the meantime, please see this $\endgroup$ – A_A Dec 4 '16 at 15:04
0
$\begingroup$

You can use this code

text = 'cmor1-';
for i=1:10
     s{i}=[text num2str(i)];
end

where s{i} contains the string cmor1-i

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.