turn code into a class???

19 views (last 30 days)
Matthew Worker
Matthew Worker on 17 Oct 2021
Edited: John Kelly on 2 Dec 2021 at 22:52
This question was flagged by Rik

Answers (1)

Steven Lord
Steven Lord on 17 Oct 2021
A function accepts input arguments and returns output arguments. What do you want your function to accept as inputs and what do you want it to return? Once you've decided that, follow the instructions on this documentation page to create your function file starting with the function definition line. Then fill in the guts of the function (modifying what you have above) so it computes the outputs from the inputs.

Community Treasure Hunt

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

Start Hunting!

Translated by