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

New to MATLAB?

deriving fractions in matlab

Asked by the noob

the noob

on 18 Jun 2013
Accepted Answer by Walter Roberson

Walter Roberson

hi, is it possible to derive a fraction? for example: (s+2)/(s^2+7)

thanks.

0 Comments

the noob

the noob

Products

No products are associated with this question.

2 Answers

Answer by Walter Roberson

Walter Roberson

on 18 Jun 2013
Accepted answer

You can use the symbolic toolbox. If you need to do it more "by hand" then use the chain rule.

1 Comment

the noob

the noob

on 18 Jun 2013

finally managed to do it, thank you guys :)

Walter Roberson

Walter Roberson

Answer by Azzi Abdelmalek

Azzi Abdelmalek

on 18 Jun 2013

You can also use an approximate derivation of your function:

s=0:0.01:100;
y=(s+2)./(s.^2+7);
dy=diff(y)./diff(s)
plot(s(1:end-1),dy)

1 Comment

the noob

the noob

on 18 Jun 2013

finally managed to do it, thank you guys :)

Azzi Abdelmalek

Azzi Abdelmalek

Contact us