フィルターのクリア

what the value of array in decimal

1 回表示 (過去 30 日間)
YOGESHWARI PATEL
YOGESHWARI PATEL 2021 年 3 月 16 日
コメント済み: YOGESHWARI PATEL 2021 年 3 月 19 日
F(1)=0;
F(2)=1;
F(3)=-5;
for k=1:10
A=0;
for m=1:k
A=A-2*a1*Re*F(m)*(k-m+1)*F(k-m+2);
end
F(k+3)=(A/((k)*(k+1)*(k+2)))-((4*a1^2*k*F(k+1))/((k)*(k+1)*(k+2)));
end
% disp(F)
for k=1:1:12
series1(x)=series1(x)+F(k)*(power(x,k-1));
end
series1
for x=1:11
e=(x-1)/10
U1(x)=series1(e)
end
I want the value of U1(x) in decimal form .I use the command disp( U1) ,it is no doubt displaying the value but in the fraction form and Iwant in decimal form.In addition to that I want to plot the graph for different value of e.

採用された回答

Walter Roberson
Walter Roberson 2021 年 3 月 16 日
a1 and Re are undefined.
series1 and x are undefined at the point where you first use them.
I suspect that you initialized
syms x
which is not the proper thing to do in this case: if x is symbolic then series1(x) would be a symbolic function, but you cannot define a symbolic function in terms of itself (the series(x) on the right hand side.)
  6 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 18 日
It means that my demonstration is running on a system that does not support input(), so I arranged the code to detect that it is not running on Windows and to use constant values for alpha and Re. If the same code were to be run on Windows it would prompt for inputs.
YOGESHWARI PATEL
YOGESHWARI PATEL 2021 年 3 月 19 日
Thank you .I got the solution.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by