How can I get a Decimal output instead of a Fractional one for this?

When I process the following script, the output of the integral, i, is in the form of fractions.

What do I have to do to get matlab to convert these fractions into decimals. Either before the output or after will be fine.

script

clc;
clear all;
P = 0:0.02:1;
syms q;
i = int(P*q^2,q,0,6.8)

output is

i =
[ 0, 19652/9375, 39304/9375, 19652/3125, 78608/9375, ....]


Everything else that I have use Matlab for has given an output in decimal form, so I dont think it can be a settings issue.

Thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories