Matlab, engineering, Other Engineering

Provided a 1D array of integers, find all combinations of 3 values from this set such that:
a+b+c=0
For example, if one were provided with the set [3 1 3 -4 -6], the resulting answers would be [3 1
-4], [3 1 -4], and [3 3 -6], as these are the three sets of three values which sum to zero from the
provided set. Notice that the first and second solution appear to be the same, but correspond to two
solutions for the two different 3s in the provided set.
Your code should return the answer in 2D array format, where each row is a solution set (3
columns per row). If no solution sets can be found for a given input, the code should output a value of
zero.
For this assignment you should find or develop an algorithm for finding these solutions. Once
you have found or developed this algorithm, create a flowchart for this algorithm. Please conform to
the algorithm format outlined in class.
Your code should be adequately commented, such that one would be able to understand your
code by reading comments only. Your code should also include an initial code block giving a brief
overview of how to use the function and your solution process, so that someone can query your
program for this code block using the help command
Posted Date: 2/19/2012 3:20:01 AM | Location : United States







Related Discussions:- Matlab, engineering, Assignment Help, Ask Question on Matlab, engineering, Get Answer, Expert's Help, Matlab, engineering Discussions

Write discussion on Matlab, engineering
Your posts are moderated
Related Questions

Discuss the effect of supernetting on routing and explain how the issue has been tackled. Effect: increased routing information

Passive clearance control system : Compressor discharge air and HP compressor air provide cooling airflow to protect the turbine casing against rapid temperature changes. Th

Direct probe,isolation probe,high impedence probe,active probe,current probe

Vibrating beam accelerometer The electrodes are driven by a high frequency voltage (1 MHz). TheĀ displacement is measured using a phase detector from the change of capacitance b

Oil supply failure - Propeller: To prevent an overspeed caused by an oil supply failure, one of two methods may be employed: ā€¢ Hydraulic lock valve The pitch lock mecha

What is accounting management? Management accounting is worried with offering details to supervisors - that is, individuals within a company who immediate and control its functi

Q. Describe the advantages and disadvantages of hot working and cold working processes. Explain the extrusion process. Ans. Advantages of hot working process

Numerical solutions to equations: Many practical problems in engineering involve complex boundary conditions and variable properties that cannot be solved analytically, creat

Fractional distillation This process is carried out in a fractionating column, which has a series of trays as shown in the figure. The effect of the superheated steam on the h