フィルターのクリア

vpa command to display into digit

7 ビュー (過去 30 日間)
yogeshwari patel
yogeshwari patel 2021 年 12 月 26 日
回答済み: Srivardhan Gadila 2021 年 12 月 31 日
syms x t
U=zeros(1,2,'sym');
series1(x,t)=sym(zeros(1,1));
for k=1:10
U(k)=(-x)^k-1/(factorial(k));
end
for k=1:9
series1(x,t)=simplify(series1(x,t)+U(k)*(power(t,k-1)));
end
row = 0;
for x=1:3:6
row = row + 1;
col = 0;
e=(x-1);
for t=1:3:6
col = col + 1;
f=(t-1)/10;
C1(row,col)=series1(e,f);
end
end
vpa(C1,15)
I want to vale on the word document .In workspace the value is symbolic fform .Can it be stored in numeric form so that i can copy it directly to word document.
  1 件のコメント
David Hill
David Hill 2021 年 12 月 26 日
I don't understand your question. Why not just copy and paste it into the word document?

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

採用された回答

Srivardhan Gadila
Srivardhan Gadila 2021 年 12 月 31 日
When I executed the above code, I was able to copy and paste the result from the command window, even though the class of the result is "sym". But if you access the result value from the Variables editor, then you will not be able to do the same. In this case you can typecast the output of the result to double or single class as per your usecase.
res = vap(C1,15)
resDouble = double(res)
Note that it may not work for all the cases depending on the symbolic expression.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by