Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here





I apologize for this stupid question. I am by no means a whiz at MATLAB like those of you on this thread. I fumble thru it and after using the help documentation, I will usually get things to work out. But this time I am having no luck. I have created a script and it works just fine. It calculates the correct answer every time. The problem is that the answer is displayed with "alot" of digits (a whole number) in the numerator and "alot" of digits (another whole number) in the denominator. It appears as though is wants to provide me the answer as a rational number. Can something be done to change this answer to something more "convenient"?

RE: question

Thanks to both of you for taking the time to respond. The enclosed file is from whos. You can see that there are symbols and double variables. As I said in the previous post, the script kicks out the correct answer every time I use it with different variables, but it is displayed like this:

I1 =

which is obviously ridiculous. How can I get it to display something like this:

I1 = 128679.64*w00^2 + 3.21*w00*w02 + .000231*w00*w11 + 5.03*w00*w20

RE: question

Thank you Greg. Thanks a lot.
'problem solved

RE: question

Here's another question. Maybe you guys could possibly help me. Solving a system of linear equations in Matlab is obviously a basic maneuver. I other words, if I had equation#1 as 2x+4y=3 and equation#2 as 6x+4y=5, I would obviously go to the command window and type something like A=[2 4;6 4] and B=[3;5]. Then I could obviously get the answers for x and y by inv(A)*B.
But my question is this: Deep within my Matlab script, a system of linear equations that has 9 equations and 9 unknowns is eventually produced. Once the unknowns are calculated, they are subsequently used as my script continues on with further calculations. I don’t want to have to go to the command window and manually create matrices in order to obtain the unknowns like in the example I gave. Is there a technique that can be used to separate the equation coefficients from the equation symbols and create a matrix from them?

RE: question

I’ll try to be more clear with my last question.
What if I had a symbolic equation defined as:
And I had eight additional equations of similar form.
Is there a command or technique that I could use to extract the coefficients and create a 9x9 matrix without going to the command window?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


White Paper - The Criticality of the E/E Architecture
Modern vehicles are highly sophisticated systems incorporating electrical, electronic, software and mechanical components. Mechanical systems are giving way to advanced software and electronic devices, driving automakers to innovate and differentiate their vehicles via the electric and electronic (E/E) architecture. As the pace of change accelerates, automotive companies need to evolve their development processes to deliver and maximize the value of these architectures. Download Now
White Paper - Model Based Engineering for Wire Harness Manufacturing
Modern cars, trucks, and other vehicles feature an ever-increasing number of sophisticated electrical and electronic features, placing a larger burden on the wiring harness that enables these new features. As complexity rises, current harness manufacturing methods are struggling to keep pace due to manual data exchanges and the inability to capture tribal knowledge. A model-based wire harness manufacturing engineering flow automates data exchange and captures tribal knowledge through design rules to help harness manufacturers improve harness quality and boost efficiency. Download Now
White Paper - Modeling and Optimizing Wire Harness Costs for Variation Complexity
This paper will focus on the quantification of the complexity related costs in harness variations in order to model them, allowing automated algorithms to optimize for these costs. A number of real world examples will be provided as well. Since no two businesses are alike, it is the aim of this paper to provide the foundational knowledge and methodology so the reader can assess their own business to model how variation complexity costs affect their business. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close