how to upload toolbox in matlab my matlab version R2020a

1 vue (au cours des 30 derniers jours)
Shehab Tarek
Shehab Tarek le 30 Mai 2020
Modifié(e) : Dinesh Yadav le 2 Juin 2020
i want to upload the code in matlab community in communication field the code is not write in function form how can i do it

Réponses (1)

Dinesh Yadav
Dinesh Yadav le 2 Juin 2020
Modifié(e) : Dinesh Yadav le 2 Juin 2020
You have to write the code in a way function is written. Think of what are the possible inputs you want the user can give, then process those inputs and correspondingly what output your function should return. Example would be I want to calculate sum of 2 numbers, therefore i want 2 inputs and there will be one output and corresponding logic will be inside the function.
function outputOne = functionName(inputOne,inputTwo) %function signature having 2 inputs one output
outputOne = inputOne + inputTwo; %logic
end
Follow the link to know more about how to write a function.

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by