Hi, sorry to ask this, i know its really simple. I tried to look online for help but i couldnt understand why i was going wrong.(adsbygoogle = window.adsbygoogle || []).push({});

I have a function u = [0.25*s]/[0.005 + s]

I put this in a .m file.

I am going to use this by puting an initial value (so) in to find u. Then u is used in a differential equation to find a new s.

but when i for example write, s=2 iget this message

>> s=2

s =

2

>> u

??? Input argument "s" is undefined.

Error in ==> u at 2

u = [0.25*s]/[0.005 + s]

>>

this is my m file

function u = f(s)

u = [0.25*s]/[0.005 + s]

i havent really used mat lab before so any halp would be great.

Thanks, rem

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

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!

# Basic function in matlab

Loading...

Similar Threads for Basic function matlab |
---|

Surface plot for a 3D function |

Program that calculates the list of x and f(x) for a given function |

Using Visual Basic |

C/++/# Is Pass-by-Reference part of a Function Signature? |

Anyone know any good basic hacking books? |

**Physics Forums | Science Articles, Homework Help, Discussion**