Тёмный

Anonymous Function Handles In Matlab - Advanced Matlab Tutorial 

CodingLikeMad
Подписаться 3,4 тыс.
Просмотров 5 тыс.
50% 1

This matlab tutorial video shows how to use anonymous function handles in matlab. Covers using function handles as inputs, as well as how to make function interfaces in matlab. This provides the same functionality as lambda functions in other similar languages.

Наука

Опубликовано:

 

29 июн 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@tab2do
@tab2do 3 месяца назад
Thanks a lot! You explain it very clearly and I like the notes for potential contexts to keep in mind
@michaelwirtzfeld7847
@michaelwirtzfeld7847 3 года назад
Nicely done. Thank you. A couple of comments to guide novice users who might see this video. In your "plotNice" function, I would set the font size of the title and axes separately or jointly using the set method on the GCA object. I had the impression that you caught this as you filmed the video. Also, when you talked about bugs in anonymous functions and how they might be difficult to troubleshoot, a simple example would have given a context to this idea. Thanks again for the video. Also, it's nice to see someone else who has invested a lot of time working with Matlab. :)
@CodingLikeMad
@CodingLikeMad 3 года назад
Yeah, good points for sure. I was debating refilming to fix the plot nice bug, but it wasn't really the point to get it exactly right, just sketch the idea. Plus I kinda like watching myself mess up. I definitely am running out of matlab stuff to talk about though, time to move on to bad mouthing python I guess :p
@RealGameTitan
@RealGameTitan 3 года назад
Great demo of function handles!
@CodingLikeMad
@CodingLikeMad 3 года назад
Thanks so much :)
@mthees08
@mthees08 3 года назад
Very good video. I enjoyed the simplicity with which the function can be used. Nothing I hate more than having to configure plots on the fly while I use matlab.
@victorvanderdrift5006
@victorvanderdrift5006 3 года назад
Awesome, thanks for sharing!
@ahmedghunaim
@ahmedghunaim 3 года назад
Could you tell me please how to let the program' user enters a function and then the program deals with this function. For instance, when the user enters the function cos(x) the program calculates cos(2) . Also , when the user enters the function sin(x) the program calculates sin(2) and so on.
@CodingLikeMad
@CodingLikeMad 3 года назад
Do you want any function, or just specific ones? I talk about the general case in my eval video, although for the reasons I lay out there it is somewhat a dangerous approach. Please see if that video helps.
@ahmedghunaim
@ahmedghunaim 3 года назад
@@CodingLikeMad I need the user to enter any function and the program gives the value of func(2) for instance. I tried the inline command and it works. But I need not to use this command.
@CodingLikeMad
@CodingLikeMad 3 года назад
Yeah, the eval command will do that. See my comment from before.
@ahmedghunaim
@ahmedghunaim 3 года назад
@@CodingLikeMad Sorry to disturb you. But this is what I need. This is my code : f1 = input('Enter the function f(x): '); f = inline(f1); After that I can write in the command window: f(3) and I will have a result of substituting 3 in the function that the user entered. I would like to get red of inline command. How please ?
@MageshJohn
@MageshJohn 3 года назад
Thank you...
@tesnimesetouane3204
@tesnimesetouane3204 3 года назад
Thank you so much ❤️ Please I need your help to get a Mathématic prediction model using non linear regression with ANN.?! And How to choose the exact control parameters?! Thank youuu for help
@alit8528
@alit8528 3 года назад
thanks. very helpful...But if I want to use a function handle with a variable number of inputs for example in an array, is that possible?
@alit8528
@alit8528 3 года назад
I want to define an objective function in which the number of inputs and their values changes in each iteration, so also inputs are not determined numbers
@CodingLikeMad
@CodingLikeMad 3 года назад
I would take a look at varargin, I dont know if it will work with function handles but that approach is a good start. You could also wrap the inputs in a structure and have equal number of inputs each time.
@Master-nv3od
@Master-nv3od 2 года назад
How to multiply two or more anonymous function and plot?
Далее
skibidi toilet zombie universe 33 ( New Virus)
02:59
Просмотров 2,2 млн
How to Use Function Handles in MATLAB
4:51
Просмотров 31 тыс.
How To Fix Missing Data In Matlab [Machine Learning]
12:21
Reading Video Files With Matlab For Image Processing
12:44
Function Handles, handles the function
11:07
Просмотров 22 тыс.
How to Plot in Julia
6:42
Просмотров 7 тыс.
Mastering Programming with MATLAB: Recursion Part 1(1)
46:20
Gizli Apple Watch Özelliği😱
0:14
Просмотров 4,5 млн