Hello,
Whenever I create a function on matlab, an error message appears as follows:
Error: Function definitions are not permitted at the prompt or in scripts.
For example this function which finds the factorial of an integer:
n=[1:100]; function [y] = fact(n)if(n<=1)y=1;elsey=n*fact(n-1)end
Best Answer