Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Large numbers in solutions

Subject: Large numbers in solutions

From: Baha Kuzu

Date: 15 Oct, 2010 14:53:03

Message: 1 of 2

Anybody can help to get rid of this large numbers? =>
__________________________
>> u=[0.6124 -0.6124 -0.5; -0.2041-0.5772*i -0.2041+0.5772*i 0.5; -0.2887+0.4082*i -0.2887-0.4082*i 0.7071];
>> syms t
>> a=u*[exp(2.*i.*t) 0 0; 0 exp(-2.*i.*t) 0; 0 0 1]*transpose(u)*[1; 0; 0]
>> simplify(a)
 
ans =
 
                                (2343961*cos(t)^2)/1562500 - 1562711/3125000
        - (3124771*sin(2*t)*i)/12500000 - 1/4 - (2209233*cos(2*t)*i)/3125000
 - (4419997*sin(2*t)*i)/12500000 - 7071/20000 + (3124771*cos(2*t)*i)/6250000
___________________________
I want to get sth like 1.2 sinx.. not these large numbers.

I appreciate. Thank you in advance.

Subject: Large numbers in solutions

From: Sean

Date: 15 Oct, 2010 15:11:03

Message: 2 of 2

"Baha Kuzu" <ibaha411@hotmail.com> wrote in message <i99psf$fj4$1@fred.mathworks.com>...
> Anybody can help to get rid of this large numbers? =>
> __________________________
> >> u=[0.6124 -0.6124 -0.5; -0.2041-0.5772*i -0.2041+0.5772*i 0.5; -0.2887+0.4082*i -0.2887-0.4082*i 0.7071];
> >> syms t
> >> a=u*[exp(2.*i.*t) 0 0; 0 exp(-2.*i.*t) 0; 0 0 1]*transpose(u)*[1; 0; 0]
> >> simplify(a)
>
> ans =
>
> (2343961*cos(t)^2)/1562500 - 1562711/3125000
> - (3124771*sin(2*t)*i)/12500000 - 1/4 - (2209233*cos(2*t)*i)/3125000
> - (4419997*sin(2*t)*i)/12500000 - 7071/20000 + (3124771*cos(2*t)*i)/6250000
> ___________________________
> I want to get sth like 1.2 sinx.. not these large numbers.
>
> I appreciate. Thank you in advance.

doc vpa

vpa(a,5)

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us