Hello,(adsbygoogle = window.adsbygoogle || []).push({});

First of all, I am not trying to "spam" subforums. I found out that my thread shouldn't be posted under homework. Anyways, here it is.

Integration

Let say there's a polynomial, 5x+6 and you want to integrate from 0 to 3 respect to x, how do you input in MATLAB? (I guess you can't figure out the constant once you integrate it since you don't have initial conditions. Ignore that constant part unless it's needed to execute the command.)

My major problem is that the MATLAB doesn't want to execute anything unless I specify x prior to that, which means it doesn't want to work in variable forms.

Bottomline, I want that equation integrated from 0 to 3 and substitute 100 into x to obtain value.

Derivative

Same as above, if I want to take a derivative of (x^2)+6 where x=2, what do I need to input in MATLAB?

I've tried integrate, int, diff, and many other commands that I found under MATLAB but it doesn't do what I want it to do. (diff basically takes the difference but one source told me that it's for derivative.)

Thanks!

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB Code help!

Loading...

Similar Threads - MATLAB Code help | Date |
---|---|

Matlab MATLab: Not enough inputs for nlinfit | Nov 16, 2017 |

Matlab Help needed to fix a matlab code | Nov 8, 2017 |

[Matlab] Gui help for adding code | Jun 4, 2014 |

Help with MATLAB code; discrepancy between graph max and Matlab's max | Feb 15, 2014 |

Please I need a Help with matlab code (Controlling the LEGO NXT Using MatLab) | Dec 7, 2012 |

**Physics Forums - The Fusion of Science and Community**