Function with one input and no outputs

Hello!
I was just wondering if anyone knew how to define a function with one input and no outputs and could maybe give an example? Thank you!

 Accepted Answer

printmsg("Hello World")
Hello World
function printmsg(msg)
disp(msg)
end

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Asked:

on 20 Apr 2021

Answered:

on 21 Apr 2021

Community Treasure Hunt

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

Start Hunting!