MATLAB Tutorial 8 – Writing Functions

In this tutorial you will learn how to write functions in MATLAB, supply function arguments, and return values; via


Ahmad Salman says:

Thanks Man Your’e Great !!! 🙂

TOP 10 says:

thank you very much

EastWindBreaks says:

so the output argument in the bracket only serves the purpose of printing the result of the function? we can leave it blank if we print it somewhere else?

Yawei Tong says:

You are the best!! thanks

noobkosh says:

your keyboard sounds like a trumpet XD 

Fox Man says:

Thanks Man

vALIents InfoTech says:

For more understanding watch this video:

Benjamin Kristanto says:

how do i do this ?

1. Write a function to compute the geometric mean using . a. Overload the function such that it can take both the vector and matrix input. b. Include a second input as “dimension”. When specified, the function returns the geometric mean along the particular dimension of a matrix. Else, the function returns the geometric mean of each column. c. In a separate script, generate a random matrix of size 100 x 100. Compute the geometric mean of this matrix along each column and along each row. d. Suppose an orange tree yields 100 one year and then 180, 210 and 300 the following years. Compute the growth rate for each year. Using the arithmetic mean and geometric mean to calculate an average growth rate over three years (with the built-in MATLAB function mean and your function Gmean). e. Which of the mean is more appropriate for describing the proportional growth? What is the prediction of the orange

officepie1 says:

Great video. I had to watch some poor ones before finding this!

Luiz Amorim says:

Fantastic, a pitty you stoped making more videos.

Freebird says:

Thanks buddy

FCM says:

I love this video.

Bedo Calaway says:


Patrick Chow says:

Its hard to find a clear explanation on youtube video. You did a really good job 🙂 Thx a lot!

Strange Particl says:

Super fine, Thank you for the short listen about the function and how to do it like this easy way
Strange Particl

Jai L says:

are you available for tutoring?

w George says:


Valerie makumire says:

Bucky, is that you?

Dan and Krypto says:

Thank you so much…

Bandar says:

They are mentally ill. So, they will not affect the video.

smnenkov says:

Sweet video

Samy Hacker says:


abhijeet2508 says:

how can i pass directory to a function??

Ch Bilguun says:

A great video of introduction to a matlab function! Loved the simplicity. <3

Daniel Berlien says:

Thanks man!! Can’t be explained better than you did

sonu dasari says:

which keyboard were you using mate?

Carlos Morales says:

I love you

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!