Got Questions? Get Answers.
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:
simple problem

Subject: simple problem

From: Dave

Date: 29 Mar, 2009 11:40:03

Message: 1 of 6

Hi,

I am trying to work out the slope of saturation vapour pressure (as found at http://www.apesimulator.it/help/models/evapotranspiration/Slope_of_saturation_vapour_pressure_curve.html).

I am using this line of code: to work out one part of it:

b=0.6108*exp((17.27*test(:,1))/(test(:,1)+237.3));

where test(:,1) is just a column from 1 - 20.

my question is.. why is the output of the above a 20x20 array, when all I input is one column? looks like the figures i want are in column 20 and the rest are just 0.6108*exp(0).

please help

Dave

Subject: simple problem

From: Bruno Luong

Date: 29 Mar, 2009 11:54:01

Message: 2 of 6

"Dave " <yogi_cave@yahoo.com> wrote in message <gqnmmj$504$1@fred.mathworks.com>...
> Hi,
>
> I am trying to work out the slope of saturation vapour pressure (as found at http://www.apesimulator.it/help/models/evapotranspiration/Slope_of_saturation_vapour_pressure_curve.html).
>
> I am using this line of code: to work out one part of it:
>
> b=0.6108*exp((17.27*test(:,1))/(test(:,1)+237.3));
>
> where test(:,1) is just a column from 1 - 20.
>
> my question is.. why is the output of the above a 20x20 array, when all I input is one column? looks like the figures i want are in column 20 and the rest are just 0.6108*exp(0).
>
> please help
>
> Dave

help mrdivide % '/' you are using
help rdivide % './' you should you

Bruno
hel

Subject: simple problem

From: Dave

Date: 29 Mar, 2009 12:15:04

Message: 3 of 6

Gotcha!

I knew it would be simple and I knew I would sound like a idiot...

Thanks a lot for your time!

Dave

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <gqnngp$nam$1@fred.mathworks.com>...
> "Dave " <yogi_cave@yahoo.com> wrote in message <gqnmmj$504$1@fred.mathworks.com>...
> > Hi,
> >
> > I am trying to work out the slope of saturation vapour pressure (as found at http://www.apesimulator.it/help/models/evapotranspiration/Slope_of_saturation_vapour_pressure_curve.html).
> >
> > I am using this line of code: to work out one part of it:
> >
> > b=0.6108*exp((17.27*test(:,1))/(test(:,1)+237.3));
> >
> > where test(:,1) is just a column from 1 - 20.
> >
> > my question is.. why is the output of the above a 20x20 array, when all I input is one column? looks like the figures i want are in column 20 and the rest are just 0.6108*exp(0).
> >
> > please help
> >
> > Dave
>
> help mrdivide % '/' you are using
> help rdivide % './' you should you
>
> Bruno
> hel

Subject: simple problem

From: Bruno Luong

Date: 29 Mar, 2009 12:15:04

Message: 4 of 6

Sorry for the Typo
>
> help mrdivide % '/' you are using
> help rdivide % './' you should instead *use*
>

Bruno

Subject: simple problem

From: Walter Roberson

Date: 30 Mar, 2009 19:23:36

Message: 5 of 6

Dave wrote:


> b=0.6108*exp((17.27*test(:,1))/(test(:,1)+237.3));
>
> where test(:,1) is just a column from 1 - 20.

Are you aware that / is a matrix operator? Have you considered using ./ instead ?

Subject: simple problem

From: Dave

Date: 30 Mar, 2009 20:05:18

Message: 6 of 6

I now realise this. I'm pretty new to MATLAB and appreciate all the help that can be found on this forum! what a bunch of stars y'all are!

thanks!

Dave

Walter Roberson <roberson@hushmail.com> wrote in message <U_8Al.177713$xK6.84630@newsfe12.iad>...
> Dave wrote:
>
>
> > b=0.6108*exp((17.27*test(:,1))/(test(:,1)+237.3));
> >
> > where test(:,1) is just a column from 1 - 20.
>
> Are you aware that / is a matrix operator? Have you considered using ./ instead ?

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