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:
Matlab beginner

Subject: Matlab beginner

From: Romiza

Date: 9 May, 2010 01:04:05

Message: 1 of 6

Hi,

I am seeking some help, I have developed he follwing file to obtain some graphs, however now i need to get the gradient of it and have no idea how to go about it. Could someone please help me:

My file is below:
x = linspace 0; 180; 10;
y = 7.657*log(x)+28.206;
plot (x, y, '--');
xlabel('Time (minutes)')
ylabel ('Concentration (g/L)')
hold on
y = 7.0516*log(x)+21.051;
plot (x, y, 'o');
y = 5.948*log(x)+17.64;
plot (x, y, 's');
y = 9.6964*log(x)+25.292;
plot (x, y, '-');
hold off


Thank you

Subject: Matlab beginner

From: Roger Stafford

Date: 9 May, 2010 03:08:06

Message: 2 of 6

"Romiza " <rrm_romi@hotmail.com> wrote in message <hs51m5$aqt$1@fred.mathworks.com>...
> Hi,
>
> I am seeking some help, I have developed he follwing file to obtain some graphs, however now i need to get the gradient of it and have no idea how to go about it. Could someone please help me:
>
> My file is below:
> x = linspace 0; 180; 10;
> y = 7.657*log(x)+28.206;
> plot (x, y, '--');
> xlabel('Time (minutes)')
> ylabel ('Concentration (g/L)')
> hold on
> y = 7.0516*log(x)+21.051;
> plot (x, y, 'o');
> y = 5.948*log(x)+17.64;
> plot (x, y, 's');
> y = 9.6964*log(x)+25.292;
> plot (x, y, '-');
> hold off
>
>
> Thank you

  What's wrong with using your knowledge of calculus to evaluate the derivative of log(x) directly? That's what the gradient is along these one-dimensional curves.

Roger Staffod

Subject: Matlab beginner

From: Romiza

Date: 12 May, 2010 10:32:04

Message: 3 of 6

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hs58um$jgi$1@fred.mathworks.com>...
> "Romiza " <rrm_romi@hotmail.com> wrote in message <hs51m5$aqt$1@fred.mathworks.com>...
> > Hi,
> >
> > I am seeking some help, I have developed he follwing file to obtain some graphs, however now i need to get the gradient of it and have no idea how to go about it. Could someone please help me:
> >
> > My file is below:
> > x = linspace 0; 180; 10;
> > y = 7.657*log(x)+28.206;
> > plot (x, y, '--');
> > xlabel('Time (minutes)')
> > ylabel ('Concentration (g/L)')
> > hold on
> > y = 7.0516*log(x)+21.051;
> > plot (x, y, 'o');
> > y = 5.948*log(x)+17.64;
> > plot (x, y, 's');
> > y = 9.6964*log(x)+25.292;
> > plot (x, y, '-');
> > hold off
> >
> >
> > Thank you
>
> What's wrong with using your knowledge of calculus to evaluate the derivative of log(x) directly? That's what the gradient is along these one-dimensional curves.
>
> Roger Staffod

Nothing is wrong with my knowledge of calculus!!!!!! But my supervisor wants it done on matlab!!!!!!!!!

Subject: Matlab beginner

From: TideMan

Date: 12 May, 2010 10:42:50

Message: 4 of 6

On May 12, 10:32 pm, "Romiza " <rrm_r...@hotmail.com> wrote:
> "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid> wrote in message <hs58um$jg...@fred.mathworks.com>...
> > "Romiza " <rrm_r...@hotmail.com> wrote in message <hs51m5$aq...@fred.mathworks.com>...
> > > Hi,
>
> > > I am seeking some help, I have developed he follwing file to obtain some graphs, however now i need to get the gradient of it and have no idea how to go about it. Could someone please help me:
>
> > > My file is below:
> > > x = linspace 0; 180; 10;
> > > y = 7.657*log(x)+28.206;
> > > plot (x, y, '--');
> > > xlabel('Time (minutes)')
> > > ylabel ('Concentration (g/L)')
> > > hold on
> > > y = 7.0516*log(x)+21.051;
> > > plot (x, y, 'o');
> > > y = 5.948*log(x)+17.64;
> > > plot (x, y, 's');
> > > y = 9.6964*log(x)+25.292;
> > > plot (x, y, '-');
> > > hold off
>
> > > Thank you
>
> >   What's wrong with using your knowledge of calculus to evaluate the derivative of log(x) directly?  That's what the gradient is along these one-dimensional curves.
>
> > Roger Staffod
>
> Nothing is wrong with my knowledge of calculus!!!!!! But my supervisor wants it done on matlab!!!!!!!!!

Mmmm.............
You want to get the gradient in Matlab, but you have no idea how to do
it.
In the above sentence, what is the one word that describes what you
want to do?
Don't you think it would be a good idea to open the Matlab help and
look for that word?
Or would you like us to give you the answer so that you can gain an
advantage over all your classmates because you were a brazen enough
cheat to ask here on this forum?

Subject: Matlab beginner

From: ImageAnalyst

Date: 12 May, 2010 10:45:37

Message: 5 of 6

Did you happen to type "gradient" into the help? If you do, you may
find some help:

"gradient

Numerical gradient
Syntax

FX = gradient(F)
[FX,FY] = gradient(F)
[FX,FY,FZ,...] = gradient(F)"

Subject: Matlab beginner

From: us

Date: 12 May, 2010 10:49:05

Message: 6 of 6

"Romiza "
> > What's wrong with using your knowledge of calculus to evaluate the derivative of log(x) directly? That's what the gradient is along these one-dimensional curves.
> >
> > Roger Staffod
>
> Nothing is wrong with my knowledge of calculus!!!!!! But my supervisor wants it done on matlab!!!!!!!!!

do NOT ever use that kind of outburst in this NG... in particular, against roger...
do as you were told and implement your solution it in ML...

us

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