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:
parameter assessment

Subject: parameter assessment

From: Mateusz Gos

Date: 10 Feb, 2012 05:40:26

Message: 1 of 3

Hi all,

My question is really somewhere in between COMSOL and MATLAB, but hopefully someone will be able to help me. I am using two expressions to calculate a certain parameter, and the objective is to pick the one that under given conditions gives a result, which is a real number and 0<=x<=1. I can figure out how to make MATLAB do the assesment and pick the value calculated from either of the two expressions, but only using build-in routines and somewhat bulky code. Is there any way of doing it with some smart and simple formula, ideally accepting vector inputs?

Any help will be very much appreciated, M.

Subject: parameter assessment

From: Torsten

Date: 10 Feb, 2012 07:34:34

Message: 2 of 3

On 10 Feb., 06:40, "Mateusz Gos" <webmaste...@wp.pl> wrote:
> Hi all,
>
> My question is really somewhere in between COMSOL and MATLAB, but hopefully someone will be able to help me. I am using two expressions to calculate a certain parameter, and the objective is to pick the one that under given conditions gives a result, which is a real number and 0<=x<=1. I can figure out how to make MATLAB do the assesment and pick the value calculated from either of the two expressions, but only using build-in routines and somewhat bulky code. Is there any way of doing it with some smart and simple formula, ideally accepting vector inputs?
>
> Any help will be very much appreciated, M.

And which value do you want to take if both expressions yield a real
number x with 0<=x<=1 ?

Best wishes
Torsten.

Subject: parameter assessment

From: Mateusz Gos

Date: 10 Feb, 2012 17:16:11

Message: 3 of 3

Torsten <Torsten.Hennig@umsicht.fraunhofer.de> wrote in message <e4d36cf8-c712-492d-86bd-5375ac756cb7@w19g2000vbe.googlegroups.com>...
> On 10 Feb., 06:40, "Mateusz Gos" <webmaste...@wp.pl> wrote:
> > Hi all,
> >
> > My question is really somewhere in between COMSOL and MATLAB, but hopefully someone will be able to help me. I am using two expressions to calculate a certain parameter, and the objective is to pick the one that under given conditions gives a result, which is a real number and 0<=x<=1. I can figure out how to make MATLAB do the assesment and pick the value calculated from either of the two expressions, but only using build-in routines and somewhat bulky code. Is there any way of doing it with some smart and simple formula, ideally accepting vector inputs?
> >
> > Any help will be very much appreciated, M.
>
> And which value do you want to take if both expressions yield a real
> number x with 0<=x<=1 ?
>
> Best wishes
> Torsten.

Thank you for the reply. One of the espressions is bound to meet these cryterias, and to my understanding of the source text ONLY one will. If for some reason I am wrong and both do... well, there would simply be no way of saying which one is correct so I would just pick random one and hope that in the next 'loop' of executing the code the possible errror will be nullified.

Regards,
M.

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