Troubleshooting MATLAB Functions and Variables

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
bocuk
Messages
1
Reaction score
0
i have a question.
i just try to learn MATLAB however i couldn't 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 doesn't 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 doesn't read the constant values from the script file or script file doesn't 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?
 
Physics news on Phys.org