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:
cycling through and testing solutions to a quartic

Subject: cycling through and testing solutions to a quartic

From: Armen

Date: 12 Jul, 2011 15:47:09

Message: 1 of 1

Hey guys:

I am in the final stages of writing a function that essentially solves a very complicated quartic function for some value x (where there exist between zero and four distinct real solutions for x). Two (or rather, three) other values are defined by equations using x as an input, these are y and +/-z.

Right now I have all of these values stored in an n-by-4 array, where n is the number of solutions for x, and each row consists of x, y, +z, -z. I now need each set of solutions to undergo a "false fix test," that is, each xyz set needs to satisfy three equations. One of these equations will discriminate the sign of z, throwing out the unused value.

My question is this - what is the best way to go about cycling through each solution set so that 1. the proper z value is kept based on the discriminating equation, and 2. all solution sets that do not satisfy any of the false-fix criteria are thrown out. In the final stage, I would like the values stored in an array much like the one at the beginning of this problem, except resized to include only solutions that have passed the false-fix test and the valid z value.

Thoughts?

Thanks.

am

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