How do I output a scientific (exponential) number multiplied by a symbol.
1 view (last 30 days)
Show older comments
Hello
I'm writing a code which involves partial differentiation and integration with symbols. The problem is that the code outputs the number as a fraction which includes a huge numerator and an even bigger denominator. Is there a way to out put it as an exponential for example 5.56E-6? And if possible is there a way to show more significant figures.
The I1, I8 are the outputs.
%Castigliano With Respect to R1x %Clear command window and variables clearvars; clc; %Stating the knowns x1=0.01336; x2=0.01871; x3=0.02405; syms R1x R2x Fx1 Fx2 x
%First Moment M1 = R1x * x disp('dM1/dR1_x: '); k=diff(M1,R1x); disp(k) I1 = int( M1 * diff(M1,R1x), x, 0, x1)
%Eighth Moment M8 = R1x*(3*x1+2*x2+x3)-Fx1*(x3/2+x2+2*x1)+R2x*(x1)+(R1x-Fx1+R2x)*x disp('dM8/dR1_x: '); k=diff(M8,R1x); disp(k) I8 = int( M8 * diff(M8,R1x), x, 0, x2)
0 Comments
Answers (1)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!