For Programmers: Free Programming Magazines  


Home > Archive > Matlab > January 2008 > concaternating strings









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author concaternating strings
rush

2008-01-06, 8:21 am

hello,

i'm trying to concaternate the formula for the sum of exponentially
damped sinusoids. this is the code i have used to generate the
formula:

clc
np=2;
for i=1:4:4*np-3;
['+v(',int2str(i),')*exp(-v(',int2str(i
+1),')*t). *sin(2*pi*t*v(',int2str(i+2),')+v(',int2
str(i+3),'))']
end

for np=2 for instance, i will like matlab to display the answer in the
form: +v(1)*exp(-v(2)*t).*sin(2*pi*t*v(3)+v(4))+v(5)*exp(-
v(6)*t).*sin(2*pi*t*v(7)+v(8))

any ideas/suggestions will be very welcome.

thanks.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com