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:
Dimensional Analysis?

Subject: Dimensional Analysis?

From: Naveen

Date: 5 Dec, 2009 05:00:24

Message: 1 of 4

I have a function call "exp()" in my reaction equation.
Thus, I am not able to perform dimensional analysis and unit conversion. So, the output is wrong.

What should I do?? Is there any other way to express "e^-kt" in MATLAB?
or will I be able to do dimensional analysis and unit conversion with function calls?

Subject: Dimensional Analysis?

From: Matt J

Date: 5 Dec, 2009 07:57:05

Message: 2 of 4

"Naveen " <navthecrazy@gmail.com> wrote in message <hfcpd8$r2i$1@fred.mathworks.com>...
> I have a function call "exp()" in my reaction equation.
> Thus, I am not able to perform dimensional analysis and unit conversion. So, the output is wrong.
>
> What should I do?? Is there any other way to express "e^-kt" in MATLAB?
> or will I be able to do dimensional analysis and unit conversion with function calls?

Why not just rename your function?

Subject: Dimensional Analysis?

From: Mat Hunt

Date: 6 Dec, 2009 17:54:03

Message: 3 of 4

"Naveen " <navthecrazy@gmail.com> wrote in message <hfcpd8$r2i$1@fred.mathworks.com>...
> I have a function call "exp()" in my reaction equation.
> Thus, I am not able to perform dimensional analysis and unit conversion. So, the output is wrong.
>
> What should I do?? Is there any other way to express "e^-kt" in MATLAB?
> or will I be able to do dimensional analysis and unit conversion with function calls?

I can't comment about matlab but I can comment about dimensional analysis. The exponent should be dimensionless as it only possible to exponentiate a number. My advise is to examine the non-dimensionalisation scheme you have.

Mat

Subject: Dimensional Analysis?

From: Arthur Goldsipe

Date: 15 Dec, 2009 20:35:19

Message: 4 of 4

"Naveen " <navthecrazy@gmail.com> wrote in message <hfcpd8$r2i$1@fred.mathworks.com>...
> I have a function call "exp()" in my reaction equation.
> Thus, I am not able to perform dimensional analysis and unit conversion. So, the output is wrong.
>
> What should I do?? Is there any other way to express "e^-kt" in MATLAB?
> or will I be able to do dimensional analysis and unit conversion with function calls?

Hi Naveen,

If you include a function like exp() in your reaction rate AND you are using unit conversion, you will get a warning, but you can still simulate the model. As Mat said, the main thing to remember is that the argument to exp() should me dimensionless. Thus, if your reaction rate includes the expression "exp(-k*time)", the units on time are "second" and the units on k must be "1/second".

Hope this helps.
--Arthur

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