Is it possible to set a function within one m file and use that function in matlab?
Show older comments
In Python, we can set a function and use function at a same file.
then,Is it possible to set a function within one m file and use that function in matlab?
for example, i want to make summantion function like this,
clear all; close all; clc
N1=1; N2=100;
function summation(N1,N2)
x=0;
for ct=N1:N2
x=x+ct;
end
end
summation(N1,N2)
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!