22 views (last 30 days)

I want to plot the following functions,

Here, and given by

is a set of values of values given by,

I have approximated a set of values for . I have tried the following code, but failed to generate expected plot. Is that due to approximation, or there is any other error in my code?

clc

clear all

syms Y

k = 0.1;

j=[-8.0671,-5.30732,-2.62768,0,8.0671,5.30732,2.62768];

for i=1:length(j)

f1 = (sin(j(i))+ k*j(i)*cos(j(i)))*cos(j(i)*Y) - (cos(j(i)) - k*j(i)*sin(j(i)))*sin(j(i)*Y);

f2=((((j(i).^4)/16)+1)*((k*(k + 1)*sin(j(i))) - (1 + 2*k - k^.2*j(i).^2)*((cos(j(i)))/(2*j(i)))));

U=0.25*sum(((f1/f2)*exp(-0.25*j(i).^2)),i,1:8);

fplot(U);xlim([0 1]);%hold on;

end

darova
on 8 Sep 2019

Looks like simple sin() or cos():

What do you think?

Try my script, i think i reached a success

Sign in to answer this question.

Opportunities for recent engineering grads.

Apply Today
## 3 Comments

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743403

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743403

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743425

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743425

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743426

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/479387-plotting-infinite-series-with-set-of-parameters#comment_743426

Sign in to comment.