필터 지우기
필터 지우기

Plotting infinite series with set of parameters

조회 수: 1 (최근 30일)
Moslem Uddin
Moslem Uddin 2019년 9월 8일
댓글: Moslem Uddin 2019년 9월 10일
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
  댓글 수: 3
Moslem Uddin
Moslem Uddin 2019년 9월 8일
I have considered $\tau=1$
Moslem Uddin
Moslem Uddin 2019년 9월 8일
It’s not a surface plot.

댓글을 달려면 로그인하십시오.

채택된 답변

darova
darova 2019년 9월 8일
Looks like simple sin() or cos():
export_fig_out.png export_fig_out1.png
What do you think?
Try my script, i think i reached a success
  댓글 수: 10
darova
darova 2019년 9월 10일
Try to write clearer script. Hard to understand it if everything is written in one line
You forgot the dot
Also declaring y two times
11Untitled.png
Moslem Uddin
Moslem Uddin 2019년 9월 10일
Thanks a lot!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by