Renaming function so that its shorter?
3 views (last 30 days)
Show older comments
I have a function in which i use this code to call when needed;
[AUM_END] = power(AUM, AUM0, D100, FS, BLOCKM, DRAT, RHO, VTM, AM,...
AMUCD, KIM, NM, CM, RM, CD0M, BLOCKT, LBOOM, VTT, AT, KIT, NT, RT,...
CD0T, CT, PAUX, TRLF, NENG, AEF, PRAT, TRAT,
BEF, FUSED, FUSED0, TLEG);
As you can see, thats extremely long and takes up a lot of room when i need to call 9 times.. is there a way I can call this exact function using a different name?
I've tried activiating the function using only 'power'and '[AUM_END]', but in doing so MATLAB says there is not enough input arguments.
This is a function within a script.
Thanks.
4 Comments
Adam Danz
on 19 Apr 2021
No, don't use global variables.
You can condense the inputs into an array or structure.
Accepted Answer
Walter Roberson
on 19 Apr 2021
https://www.mathworks.com/help/matlab/math/parameterizing-functions.html
0 Comments
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!