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:
General Problem-solving practices

Subject: General Problem-solving practices

From: John Smith

Date: 27 Jun, 2011 22:23:04

Message: 1 of 2

Hello,

As some of you may know by now, I'm new to MATLAB. I am in my first engineering internship and I'm noticing a disagreement among the engineers so I was curious as to what approach others would take. And let me premise that it is possible my question will sound rather stupid as many of the people on this Newsreader seem to be pretty advanced mathematicians.

The problem I am working on involves a multivariable function with constraints. After spending a while trying to figure out a way to use numerical methods (maybe Newton-Raphson) for this problem or built-in MATLAB functions, my boss suggested that I just use a brute-force method-- simply calculate all the possibilities using "for" loops and select the solutions that meet certain criteria.

Another engineer in my department thinks the boss's idea is ridiculous because it's going to take several days to run the program probably. He thinks we should find an algorithm to do this quickly. I personally am happy to do it the brute-force method because I do not consider myself a mathematics genius and this allows me to at least produce something worthwhile.

Any thoughts?

Subject: General Problem-solving practices

From: Roger Stafford

Date: 27 Jun, 2011 22:47:05

Message: 2 of 2

"John Smith" <johnps@gmail.com> wrote in message <iuavs8$qin$1@newscl01ah.mathworks.com>...
> Hello,
>
> As some of you may know by now, I'm new to MATLAB. I am in my first engineering internship and I'm noticing a disagreement among the engineers so I was curious as to what approach others would take. And let me premise that it is possible my question will sound rather stupid as many of the people on this Newsreader seem to be pretty advanced mathematicians.
>
> The problem I am working on involves a multivariable function with constraints. After spending a while trying to figure out a way to use numerical methods (maybe Newton-Raphson) for this problem or built-in MATLAB functions, my boss suggested that I just use a brute-force method-- simply calculate all the possibilities using "for" loops and select the solutions that meet certain criteria.
>
> Another engineer in my department thinks the boss's idea is ridiculous because it's going to take several days to run the program probably. He thinks we should find an algorithm to do this quickly. I personally am happy to do it the brute-force method because I do not consider myself a mathematics genius and this allows me to at least produce something worthwhile.
>
> Any thoughts?
- - - - - - - - -
  This seems like a subject that will attract many diverse points of view. My own is that when fast efficient methods are readily available, it is almost always a good idea to take advantage of them. Doing so could well solve the problem you currently face better and sooner than a brute-force method, but perhaps even more importantly it is likely to set the stage for future improvements in efficiency on similar problems in your group.

  In Mathworks' Optimization Toolbox there are a number of functions that might accomplish the task that you seem to be faced with. For example fsolve can solve multivariate simultaneous equations if you provide it with an initial estimate and fmincon solves multivariate minimization problems with constraints. I am betting that somewhere in that toolbox there is a routine that will do your particular job, whatever that might be.

Roger Stafford

Tags for this Thread

No tags are associated with 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