Automatically generate functions from snippet of a script

2 次查看(过去 30 天)
Hello,
When I write a code in matlab, I usually start writing a script. When the script gets bigger, I transform it into a function and I start splitting it into sub-functions.
I wonder if there is an automatic way to transform a snippet of code into a function. What I mean is just generating the header with input. Matlab is already able to recognize variables that are declared in a function and variables that are not. Provided the output of a function, all the variables that are not declared should be automatically written in the header input.
I don't know if something like this exists, but it would be a huge saving of time!
Alessandro.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by