Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: Matlab beginner Date: Sun, 9 May 2010 03:08:06 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 26 Message-ID: <hs58um$jgi$1@fred.mathworks.com> References: <hs51m5$aqt$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-02-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1273374486 19986 172.30.248.37 (9 May 2010 03:08:06 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Sun, 9 May 2010 03:08:06 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:633870 "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