How can I write a matlab function to take one number and display double, triple, and quadruple of the number?

3 Ansichten (letzte 30 Tage)
Can you make it also using M-file?

Antworten (1)

Image Analyst
Image Analyst am 24 Feb. 2022
Do you mean like
function fun(a)
fprintf('a = %f\n2*a = %f\n3*a = %f\n4*a = %f', a, 2*a, 3*a, 4*a);
Of course you can do it in an m-file. How else were you thinking of doing it?

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by