필터 지우기
필터 지우기

Displaying symbolic function with decimal number instead of fractional coefficients

조회 수: 2 (최근 30일)
The following code outputs a symbolic function with fractional coefficients, but I want it to display the coefficients as floating point numbers or doubles. I tried using fprintf but no format specifier I tried worked. Can someone tell me how the coefficients can be formatted?
a = [1.33 2.455 3.32 4];
syms x
f = [x,x^3,x,x^3].';
a*f

채택된 답변

John D'Errico
John D'Errico 2020년 11월 11일
Just use vpa.
help vpa

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by