Im trying to define a function in a matlab m-file.(adsbygoogle = window.adsbygoogle || []).push({});

function y = f(x)

global T;

f = 1/(x^5*(exp(h*c/(k*x*T))-1));

but it doesnt work...matlab says

??? Input argument 'x' is undefined.

Error in ==> D:\Program\matlab\work\f.m

On line 6 ==> y = 1/(x^5*(exp(h*c/(k*x*T))-1));

Error in ==> D:\Program\matlab\work\a.m

On line 14 ==> lmax(i)=fminbnd(-f,0,1*10^(-6));

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

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 beginner

Loading...

Similar Threads for Matlab beginner |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB Matlab-like software |

MATLAB Matlab data into bins |

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