Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab functions

  1. Jul 24, 2012 #1
    i have a question.
    i just try to learn matlab however i couldnt define the functions and variables inside the one script. i open new script file and give the function comment in it for example like this...


    function [ y ] = betaf( x,Ee)
    lambda=0.1;
    y=100*gammaf(Ee)*lambda/(2*pi*x);

    end


    i also put constant values to script file but program doesnt recognize the function comment it gives error, i do this process in the function file...i define the function in function file and the values in script file... and then it doesnt read the constant values from the script file or script file doesnt see the function. i
    i want to use about 10-15 function in the matlab and to put the values in one script ,then i but i coldnt. or may be any easy way to make it?

    can anybody help me?
     
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Loading...
Similar Threads for Matlab functions Date
Working with Edge function in MATLAB Mar 7, 2017
MATLAB Does MatLab have this kind of function? Jan 15, 2017
Matlab error matrix function Apr 25, 2016
MATLAB Plotting a 3d function Apr 1, 2016
Fit with implicit nonlinear function - Matlab Oct 19, 2015