symsum wave harmonics along a string

Answers (2)

In order to use symsum() you would need to be using a symbolic formula with at least one symbolic variable in it. There is nothing in your definition of u that is obviously a free variable. Is w_n your free free variable? Perhaps, but you have written your Fw_n in terms of w_n and tau with tau not defined.

7 Comments

JDilla
JDilla on 17 May 2015
Edited: JDilla on 17 May 2015
yeah w_n is available to be anything (for the moment).
Still not working!
would cumsum work?
Nope! cumsum does not work haha
What precisely is it that you would like to total? You show a double-nested loop and you show a plot inside one of the loops. You have k=5: is k the harmonic number, and for "first 5 harmonics" you would like to add another level of nested loop over k ? Or is w_n your harmonic number?
"My desired output would be a symbolic function P in the parameters R, and S. It would be the sum of a symbolic function Q over R, S, and H over H from 1 to 5 where H is the harmonic number. Q(R,S,H) is defined as ...." ???
JDilla
JDilla on 17 May 2015
Edited: JDilla on 17 May 2015
Right, I've attached the expression for the net displacement of the string I am modelling. The net displacement is the sum of the standing waves
The source, which is applied at distance X_s (denoted as Xs in the expression) is given by F(w_n) which I included earlier. W_n is the frequency of the standing waves. I do not pick the frequency, I pick the tuning parameter, which determines the angular frequency and thus the overall form of the wave. Tuning paramter = tau. I can pick this to be whatever.
I need to end up with seperate harmonics (different because of different tuning parameters) and plot them, and then sum them using the expression provided
n denotes the harmonic number. Something like n=1:4 somewhere in the loop for the first 4 harmonics for example. (I want to explore particular harmonics).
I hope this makes sense. The last term is cos(w_n*t), not w*n*t.
Your first sin() appears to have x subscript s. What is that? Your second sin() has x without the subscript, and I cannot assume that x(s) and x are the same because if that were the case then your two sin() terms would be the same and you would have written the expression as sin^2() rather than as two terms.
JDilla
JDilla on 17 May 2015
Edited: JDilla on 17 May 2015
"The source, which is applied at distance X_s (denoted as Xs in the expression"
There is a source applied to the string, eg, plucking a guitar string at a distance of X_s. It can be any number.

Sign in to comment.

JDilla
JDilla on 17 May 2015
Edited: JDilla on 17 May 2015
To word this differently, I have code that describes ONE standing wave. I want 5 standing waves, of different angular frequencies (w_n) as subplots. Whilst I cannot pick the angular frequency, I can change tau. The expression of the source which determines tau is Fw_n = exp[-(w_n*tau)^2/4]. Fw_n is the expression of the source, ie, plucking or strumming the string, that is applied at a distance X_s
Then, using the expression in the picture, calculate the sum of the standing waves, and then plot this as well. The sum of the standing waves should generate a different shaped wave.

Asked:

on 17 May 2015

Edited:

on 17 May 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!