Subroutine functions in MatLab
33 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
How can I make a subroutine module (similar to another programming languages) in a MatLab m-file program?
How to call it in case you no variables between the function brackets such as "function [ init ] = init( )"?
0 Commenti
Risposte (1)
James Tursa
il 9 Ago 2018
Modificato: James Tursa
il 9 Ago 2018
Create a file with the following name: init.m
Put your code into this file, e.g.,
function stuff = init
stuff = whatever;
end
Call this function like you would any other function:
mystuff = init;
12 Commenti
Rajasmita Sahoo
il 20 Gen 2023
please kindly reply.
Walter Roberson
il 20 Gen 2023
Please see http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F for information on better approaches than using global
Vedere anche
Categorie
Scopri di più su Performance and Memory in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!