MATLAB Function Tutorial

preview_player
Показать описание
This is a tutorial on how to write custom functions in MATLAB. Table of contents below.

00:00 - Introduction
00:33 - General form
01:26 - Example function declaration
02:08 - Calling a function
03:05 - Function workspace isolation
04:30 - Example function code
05:49 - Explanation of function code
06:31 - Calling a function with fewer output arguments
07:08 - Conclusion
Рекомендации по теме
Комментарии
Автор

incredibly helpful and simply explained, thanks so much!

kilianjames
Автор

Thanks a lot....it was very did my Matlab task just because of your

rabiabatool
Автор

An outstanding tutorial, clear and with valuable common/standard practice issues. Same for the other tutorials on your channel. A very good balance between capability and options.
Thanks so much ....

andywestwood
Автор

Thanks a lot, it was really useful.

Greetings from Spain!

Joseangelarchi
Автор

thank you man, i've lost 3 hours and then i see this video

ub
Автор

wow just awesome. thanks for this very detail and well explain video

mosesmccabe
Автор

thank you for this example, very helpful :)

djokatore
Автор

Thank you so much, that was awesome explained

ericarnaud
Автор

Sir I write like u wrote, I had mentioned in command window that say FUNCTION definition are not permitted in this context.. Why

MrShortReels
Автор

Hey! at 5:45 could a while loop be used instead of if v(ii) ?

Techformative
Автор

Hey, if I have to create a function with 2 input arguments (vectors) and the output should be the value of the derivative, how is it written?

RishabhR
Автор

Hey guys, Why is a function declared at the beginning of the program? Can I declare it in between anywhere in my code? Thanks

grishp
Автор

hello there, i have problem
it says this 'Undefined function or variable 'my_max'.
when i run it

circlesofMATH
Автор

Hi I was wondering if you have any expertise with the "comet" function and would be able to help me sort out some code?
I have this code here:

a=(1:0.5:1000);
angle=a.*75;
x=cos(angle);
y=sin(angle);
t=0.5;
Ex=x.*Er;
Ey=y.*Er;
DELAY = 1;
%edit comet
%axis=5*10^12;
comet(Ex, Ey, 0)
%axis([-axis axis -axis axis]);

And it works except for the fact that it's too fast! I can't get it to slow down with any pause or delay functions, any ideas?

gfdhgfth
Автор

how would i write a function rect = rect_aperture(r1, c1, r2, c2) that constructs a rectangular aperture on a 512 by 1024 grid? so the top left (r1, c1) and bottom right (r2, c2)?

eliefant
Автор

how can i input any function i want in matlab. i mean something like (input('enter yout function'))
ty

yamenhazimi
Автор

For more understanding watch this video:

vALIentsInfoTech
Автор

Hey, How to write a function that its number of outputs depends on the value of its input...for example:


is this possible in Matlab?

MrMadrid
visit shbcf.ru