Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

why the symbolic vector minus a scalar vector produce a vector with fraction?

Status
Not open for further replies.

Sacaq

Mechanical
Nov 4, 2014
42
Hi~

When I try to solve some equations, I found the solution was all fractions.
check the value of each vector, I found where the situation start.
The codes are like this:

A12=[5.5,398,455]
syms a b c
A=[a,b,c]
AA12=A12-A

and the output were:

A12 =
5.5000 398.0000 455.0000

A =
[ a, b, c]

AA12 =
[ 11/2 - a, 398 - b, 455 - c]

After I use the function "solve" to solve the equations, the solution matrix is full of fractions.
 
Replies continue below

Recommended for you

OK, I found a solution.
just like this:

A=double(A)

It seems the glitch is the format.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor