Using MATLAB with Python | Top Questions Answered

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right yeah we're live hopefully welcome this is our uh live stream our return to live streams for 2021. um we made it um today we are joined by jan uh we'll introduce ourselves in just a moment um but we collected some questions we've been doing this for a while using matlab and python together scandalous i know just kidding it's awesome um talk about it so we've been collecting questions over the years and just recently on our social media posts um so we invite you to put any questions that you have into the comments so um i'm i'm heather i have hello i work on the matlab team um in product management and i work really closely with development and others working on matlab and python together my background is in physics and data science and machine learning now and uh it you know makes sense that you use all of these things together so i work really closely with the teams that uh do this and i do these kinds of things uh to help all of you do the same and uh john is also a colleague of mine on the matlab team as well john so my name is jan i'm part of the matlab product team with ezzer and i recently joined actually um during the first lockdown in france so that was around march uh no hours after that i don't know time is just not continuous anymore and so before that i was working for an open source alternative to my lab called scilab and so for the past six years before before joining the matlab team i was kind of a fan of open source and so that's kind of let's say it's it's kind of natural for me to to be speaking about those subjects of matlab with python because i see the benefit in both and so i'm very happy to be with you as well to discuss this today awesome yeah excellent yeah it's a good uh good introduction i think it's like yeah definitely uh open source fans here so uh just to give you more of context let me learn how to use powerpoint um we won't be using a lot of powerpoint it's just gonna help us uh keep track of where we are in our questions um these are there's basically a big five uh that came with the categories that kind of emerged uh when we collected the questions and one is just kind of philosophy like you know who does this why do you do this you know a lot of uh beginners and uh people that are kind of dabbling in both you know they want advice basically so we'll talk a little bit about that and we'll definitely talk about that along the way you'll see some um examples and then we'll talk about you know these uh jan and i collected some of the things that people are always bugging us about so it's a good way to get all of this out in the open you know install questions and headaches that you might have uh data conversion is a really really big one we have a lot of different variations of that one so we'll spend some time there and then um of course popularly machine learning deep learning you know a lot of people want to use matlab and python together so there are actually great options for this where you don't even need to go to the integration level you know so we'll talk through all of that um simulink you know can you do that yes so we'll talk about some of those um you know some advice there and then any other questions that you have again throw them in the comments we're very happy to help out and uh this is kind of you know very free form um there's you know just i don't know let us let us know what you want to hear and again we'll kind of give some tips and advice along the way uh we already have a question from ben am i think we can take it just after i want to take it now okay so the question is is it possible to interpret a function which the outputs could be defined in a struct and that struct is in a loop for iteration it's like a inception of a question all right go ahead i need a structure that's great um yeah i think that's actually a really good one to start with so we have um let's see i don't know why i have these stupid things up um let's let's just go to matlab that's way better um so one of the things uh this is i mean we'll talk more about this example later but we go through all this process and we we change data types and things like that and then we create a function um to do this in python so i think this is getting at the question you know how would you um you know create a function that returns a struct uh from matlab right so uh you know this is just a regular old function um you can pretty much do whatever in here uh there are some tips in the dock on like limitations but this would be general limitations you just kind of have to be careful about like putting path kind of stuff or like changing directories or those kinds of things that might be a little bit weird but otherwise you can put you know anything you do in matlab in here and then just kind of think ahead to what data type um will be useful in python you know some of them map all of them map pretty naturally there are great doc pages i guess i should just go at this right now um don't ask me why i'm just like doing it the hard way i could have like 300 links but it's useful because all of this stuff is in the external interfaces um section and so you can see you know the different way all millions of languages if you like uh and then you can you know start here so uh what all of these basically have this nice table of uh how to pass data and the different mappings between them oh geez here let me make this easier to read for other people but the lighting improved um so this is really useful i think generally advice for like in my head is that the lowest level things i mean if you can think to like see or like what's in the uh guts you know those are the things that'll map automatically and that will convert pretty naturally um otherwise these are the mappings and you can um you know do the conversions so structure would be addict dictionary and python and you know so those would be kind of the natural uh ways that you would deal with that so just again kind of a note for that so you know in this case you could uh return the struct and then you know that would map to a dictionary whenever you're trying to do that in python we do have additional questions um so we have different ones and one that you know it's uh how to call python from matlab and so we have another question about um can we call any function and every uh toolbox that is available in matlab from python so like they want to know about both ways yeah i think that's a great one um the i'll say at least i'll start from the matlab side because i mean it's just i have matlab open maybe um so from mathwork's side uh generally we test well no not generally we do test the standard library um so that's absolutely tested that's you know the full test suite that you would always expect from mathworks um we don't test the uh like extra packages i mean this is true for every language not just python but the extra you know uh whatever useful thing that you want uh may not be in our test suites so that's the only thing there's really no limitations on libraries uh you know that doesn't mean everything is going to work absolutely smoothly the first time you try it otherwise i would have no job probably well whatever that would be great anyway i would just do this for fun um so which i do anyway um but you know that's those are kind of the things that you want to um think through for oh my gosh now what am i talking about help me on what was the question maybe we can we can talk about how is it uh to call a matlab from python because i think so here shortly uh how to pull python from mata but i think it could be interesting for our audience to see the other around perfect yeah and so i i guess that was the other thing that i should have followed up when i started talking about what what you can call from mala but you can call from python so um that is a good thing to bring up now uh same kind of story here i i don't you know it's basically um actually i'll bring this up real quick so there are a couple of different ways to call um matlab from python so the matlab engine api is basically calling a whole matlab you know it's it's running in the background and then they're also deployment paths where you don't need like the user on the other side doesn't need to have matlab at all they just use a runtime so um i'll focus on the engine api for the most part because we'll collect we have some questions on the compilation part but so just to kind of for you know infinite clarity what i'm talking about so in that case you know you're basically just opening matlab right so it's almost like this and you can even connect to that matlab if you like um so in that case you really could run whatever toolboxes you have whatever you know whatever you have going on in your life the thing that you really need to think about is going back to those uh data types and the thing that you know thinking about the seams between the languages where you're kind of handing off um data or you know trying to figure out what code to call where which again we'll talk about a lot of this but just to uh get to the example you know this is just starting up starting up the engine um i'll just do this and starting up matlab so you know again it could be connected it could be um you know you can actually even access the workspaces this is really useful for debugging um but you know in that case you can just use any old thing that you like in matlab uh going back to the doc pages there are let's see um a couple of yeah limitations so generally these kind of tend to be like uh limitations that kind of in my mind exist whenever you're integrating a lot of languages or like you know you uh you might need to do extra stuff on your own uh to get into some of the you know nested objects or those kinds of things um but so i just for the record you know generally speaking you know there are a few of those limitations uh here and then otherwise do uh what you please and we'll give you some advice uh as we go here to you know organize things uh well um let me just get back here and we'll just kind of uh we have a lot of examples on the how to but just you know if you're joining us for the first time here um you know it's just kind of your usual matlab kind of syntax you can use anything you like and the thing again to make aware make you aware of is the data types so you know square root happens to be a function for a double or a float precision um and immediately you can see matlab error uh same with uh if we had an error from python we would immediately see where that's being raised and then oh wait it's an integer so uh okay that's what's happening that's that's just the thing that you really want to be careful about whenever you're you know thinking through this stuff that's a good one i think we do have now more questions that revolves around one some of the philosophy so i think it might be good to to go around this and then afterwards some questions about uh again data types but oh yeah that's a good one that's a hot one i mean i get it how much time if you saw my directory there were like a whole bunch of like type 2 other type and tests and things like that um so so the philosophical one just to it's not philosophical can we find some of prime number in matlab i call it but it's not oh okay different kind of philosophy yes you can so yeah i would uh that's actually a good not a bad um thing to talk about though just sort of generally speaking you know there were a lot of questions on um you know i'm a beginner in both languages or i'm just dabbling i came from some other language someone even on my instagram was like i uh code an assembly a lot like am i going to be i'm like i i don't i don't know anything about that like but i guarantee you you can learn this that's hardcore it's fun of assembly i do it's scary though i do i love it but i love the idea but man this is way easier um but just so i mean i just the one thing for me you know a lot of people were like hey how do i get started what's some advice you know where for me i just go straight to examples in both languages you know just you know google it you know and if you're in the documentation it's super easy um to do that so there's you know different mathematical things that you i mean i don't want to say mathematic mathematics like it's no big deal um but this is a great place to start you know find examples of whatever you're trying to do uh and then you know same for python so like again in that doc page you saw all the different python you know syntax and things like that you know you'll you'll find the examples here too so big deal um they're not as cool as uh this air quality one that we're talking about um that we'll link to um but you know it gives you a good chance and you can also just run these right in um matlab like online if you have a an account with mathworks um and uh you can just run it in your browser so you don't even have to install anything if you don't want you can just check it out um i'm gonna close this so i don't confuse myself um but so this is true for anything so that back to that whatever prime number question um just you know search in here and find an example that's pretty close hit it and go to town um and seeing you know again same with the python i mean there's just a world of uh examples out there so you know that's kind of my idea there's also we can send links to um our you know matlab on-ramp courses you know if you're coming um from uh other languages you know it's again i i think my philosophy i think everybody can learn anything just try it and do it and have confidence uh mess it up you'll learn you'll figure it out and ask this question um i just wanted like since i had this like example up and a lot of there were many many questions about you know what kind of use cases um are good for one or the other you know what should i do where uh that's why i have all those w questions um and you know why like you know um should i try to just do everything in one language you know those kinds of questions and so um we have a good example that kind of gives a lot of uh context around some of this and the use cases too so i think um especially you know if you're in engineering and sciences you know many times you're gonna run across both languages so you know uh thinking about you know when do i use what for what um you know i think i i think i answered this way back in the other live stream like 300 years ago um but you know i think about like what is the like how did the language start where did it come from you know who works on it and uh you know my lab it's been like i don't know like it was before we were born you know like people have been doing these like scientific engineering um amazing things and uh you know there's this whole body of work in in that land in matlab and you know same with python there's a lot of great computer scientists a wonderful uh i use all the time for api you know web apis things like that like text parsing and things like that so um i for me it's you know just kind of think about uh you know the body of the community too you know a lot of times like you know if you want help with these kinds of problems you can talk to the matlab community more easily if you want help with you know something else talk to the python community um what i don't know what about you uh john what what's your what's your take on all this well um um i won't lie to you i'm a kind of a fan of python so i really love matlab as well but uh okay um calling web services in python and so it's a very and it's it's very good for me you know to prepare all of these things and i'm mostly calling python from matlab when i want to sing to pass things over uh to matlab and then to develop some algorithm in matlab i can pass uh and over those algorithms to colleagues so it's it's really it's a really a bit of both i would say yeah that's awesome i think and even just working together you know as we you know since uh young joined you know we've uh he's been going off and doing some awesome deployment stuff and then you know he'll come back to me and say like hey you know where do i start with this thing i don't know about machine learning i'm like i just use a classification learner man like it's totally fine like you just click around you know but so i think those are the things too that you know a lot of times um there's this great body of work in both of these languages and you know whatever makes sense for you whatever you can do things faster in go for it you know and then you can integrate and so i i think the other philosophical thing that i wanted to get at is like what like how do you know what to do where you know you want to use both of them together but like what does this look like and it kind of goes back to that function question where you know how do we like organize these things and think through it and i think this is different for um matlab developers i mean maybe it's just me and many many people that i've met but i tend to just start hacking away and just start writing code and like clicking around doing stuff um but this is one of the times where you actually kind of think through the pipeline ahead of time you know so that will just save you time in the end require gathering requirements um because at least you know a lot of times you're just experimenting you know for me i'm doing deep learning machine learning that kind of stuff and so i'll find some cool algorithm you know in whatever language and i'll just bring it into matlab because that's my home um one question we have here is if i have a python code that build and train a neural network model can i call it from matlab perfect yeah exactly and that's a great example of you know thinking through this so you know um i would say you know if you have already trained it it's super easy um and that that's also another big one you know again these are uh you know matlab is wonderful for deep learning you know you saw there's a whole bunch of apps you can kind of play around and experiment and everything and then there's also oh geez i'm gonna have to google it i think uh just because i don't wanna matlab deep learning there it is so this is a nice uh website here there's my friend joanna she's awesome at this stuff and uh there are models that you can just import directly so um like the onyx framework is a great way to uh share back and forth you know so then this changed since the last time i looked at it there was just a list somewhere uh maybe it's in the github uh example here we go maybe that's it but so there are a whole bunch of models that you can just bring in and even import tensorflow so there are you know many many people use tensorflow pytorch so those have direct importers that you can find um just in the documentation um so it's it's pretty easy and again those are um examples where it you know it depends on what you're trying to do with it later um in our air quality example we're using you know a machine learning example just because we were trying to focus on some other stuff but you know we built the model in matlab we packaged all of the prediction up there too so that it didn't have to we didn't have to worry about translating the network or anything like that although we could have you know so i so i think for me it's when you know just thinking through what steps makes sense in what language um this kind of goes into another question a couple of questions that had come up before which is like performance minded kind of things you know how do i make sure that i'm doing what i need to do but i'm not you know taking all this extra overhead or opening up five matlabs or something if i don't need to um and so that's where i would also think of you know keeping whatever's sensible in you know one language and uh you can always um let's just go back here so we talked about the data types you know there were certain ones that will come out easily but you can also just continue to call the methods on the python data type or the matlab data type so that's that's another thing to think through too it's like how do you actually want to access it or work with it from the other language so you don't necessarily have to you know immediately start converting data and those kinds of things you could just use it directly so here you know it's actually returning also just for clarity this is how we call a module so just pi dot weather dot our function um or method so it's returning a python dictionary so okay it's just like a dictionary that you would work with in python but now it's just in matlab so we can actually pass that into our function and just keep going as if we're working on python kind of like a little wrapper and then whenever we want to get it back we can get it back so instead of converting all that data and then parsing it in matlab i used the parsing function that you know somebody else had already created you know john had passed over to me and now i have something that's much easier to represent in matlab and i can just bang out no big deal um so anyway i think these are the things and then this is much less data to convert um afterwards and so that's kind of um the pipeline that i think through i make a lot of notes on like sparkly pink rainbow paper it's a rainbow clipboard um not remember but you know however it helps to think that through we do have questions around here's a passing of data especially ones from assertion you might know of her she's in our french office she's creating a python function in matlab and the use of arrays generate tuples so she wants to know how to transfer transform a tuple into matlab type it's perfect yep great question um i think there was another a few that came up with this uh on instagram so for a tuple that's uh you know basically like an nd kind of type in matlab and so the most natural way to do that is a cell array um because that is sort of generic and you can have any data type in that so that's the the mapping for tuple and again this would go back to the um that list of um all the different data types that uh you know map naturally uh between them so yeah here's that also if you're using it uh let me go back to matlab oh my gosh too many things open now um you can uh just quickly call i mean this is like just a little stupid hack but you can just call methods on it and see what oh that's just instruct all right fine all right i tried to hit tab but it didn't hear me so these are the things that i can do in you know some the methods at least with the dictionary in matlab and so um you can see that there are a couple of uh conversion types that we might be able to use and so if it were a tuple we would see you know cell char those kinds of things so that's one way to just kind of quickly check if you're just you know hanging out um coding you don't want to go i don't know there's also a cheat sheet i think those are on the cheat sheet so we'll put that in the link i was going to say if you don't want to print it out and like put it up on your wall like i do um but i did make a cheat sheet just because i didn't get it awesome all right what else we got there's a question about 3d image processing for medical device is there a good resource to point to awesome um yeah so i i guess i would say you know one place to always look is the dog i mean i always just have it open anyway um but also in the file exchange uh there you can find a lot of really cool stuff so uh let's see i think yeah i just send me this here yeah this is a good one that has a lot of um you know resources collected i think there's even a yes this is true now sometimes i forget when things are released but there's even an image processing course uh now it's like just like the other on-ramps that we have um you know it's just two hours free uses matlab online so that's a really great place to start and then um you know i also just like the uh you know poking around the file exchange and seeing what uh examples you know kind of blog post type stuff and also yeah i would say that like all the blogs and everything are here too so there's a lot of great resources um just google it school it no yeah link to the chat on the 3d image processing perfect and we do have some very cool stuff uh awesome is that all right a tricky question about deployment i already did good good i should have no i i wanted to mention this when we were talking about the data type so i didn't forget but then we'll definitely talk about deployment i don't want to leave you hanging i know you're uh you're itching to talk about all the stuff that you've been working on and making appointments that's awesome um so i did want to mention since we were talking about all the data stuff uh one really common way is using parquet um oh man i wanted to make the joke i want to be like 4k because you're like 4k uh anyway that's not that funny um but uh this is a great way if you are accessing kind of a larger amount of data you know in my example i was just passing back like a one level like dictionary or whatever but um you know sometimes you actually need to access all of this data and parquet is really a nice way to do this um both matlab and python have easy libraries pandas both extremely straightforward just read write and then the nice thing about it doesn't you know make copies and do kind of um file like typical file stuff in the background um so you can see the implementation it's completely open speaking of open source uh it's not completely all closed over here so anyway we can have another philosophical discussion about what me what open source really means to you uh some other day but feel free to contribute and um check out the github uh mathworks github too all right deployment european so i answered a quick question about the capacity to uh deploy a function that was written in matlab for someone that does not have matlab installed so that's one and then there's a more tricky one that's a bonus question for afterwards oh excellent perfect so um we will go back to the weather example because this is exactly what uh the point of the weather example is i took out all the slide things because it was confusing me um but you know in this example we have all this weather stuff in python but we want to add this cool air quality prediction model from matlab and so if you're trying to deploy it obviously you don't want to open up a matlab every time someone hits your website that you know isn't really sensible so we can use the matlab runtime um so it's just this little baby thing in the background that's really wait and it runs and no big deal and no you don't have to have matlab it's you know the um the runtime is free you know you can just share your code and so it's really nice because um there are folks like me uh that now that yan has joined us i've learned all of the error in my way in deployment but there are easy apps for the matlab user to just put all their code into it hit a button and send it over to your friend um so actually have this ready let me just open it up um and so this was just the function that i had written that had the you know prediction code it also includes like the um files that you need like any map files or things like that and then you can just hit package it creates oh geez i'll probably screw this up um right the matte file is uh yep it's a classification if i recall yep exactly and so that has the um all the you know network information that it needs to make the predictions you just pull all that together send this package over to yon and he does it um i'll just do it because you know i can um so this is the same example and here we're just calling we're just importing whatever i had called it go to air qual we initialize it and just use the function and we could have put a number of methods or functions with it and you could use those no problem and it's good it's pretty good everywhere it's the winter um but you know very very straightforward and it's just using the runtime there's nothing needed and while we're just on the topic quickly like that that's sort of a good case i think for you know if you just have sort of easy deployments that you need but if you're actually running the web application that we kind of hinted at you definitely um want to use the production server uh here because it's super easy crap all right it's like oh yeah i guess i've been talking for like half an hour so now it makes sense that i'm starting to totally break down uh in my brain that's not the right one so here we go so this is the um production server compiler i just get it from the app drop down um this you know we can we have links to all these things um again we just package up our stuff it will find it automatically and the really cool thing is that there's a test here a test client so um if you have no production experience you can just do it yourself and you can um break if breakpoints if you want to debug let me just start it and hope this works um yeah yes yes i would like i can't um move right now i'm like because i'll go off screen and unplug everything um so yeah it works look look at me i can deploy things um and it was super easy so again you can break you can break into it you know this this is helpful whenever you're working together and then um you know you can include it in your uh you know web anything or you know whether you want to call it in python or javascript or whatever um the process of getting from an algorithm as a development prototyping to actual production uh version of it it can be quite tedious so here it's kind of cool when you can you know introspect on the input and output uh that are served and also go into debug mode so that's really cool yeah just just for you know for fun this is this is my website that i clearly made by copying and pasting from w3schools uh and then copying and pasting from the app into uh the url so you know it's it's very easy to do this on your own um and to collaborate so that's just you know a lot of people ask you know how do i get this how do i put it into an app you know what's the best way um you can even package up all the python stuff into the matlab function so that was actually what we were calling that's actually a good point because we had a question about uh uh flask and so uh like yeah you're taking that one because you've been working on that for the weekend i have to admit um it's it's not as powerful as a production server it's like a teeny tiny micro framework so it's uh you really need to get your hands dirty if you want to do that but uh yeah sometimes i do over the weekend get mines dirty and work with flask um it's uh it's actually good to to show like the just smaller html page that you've brought up because it can be like served as a flask application um and this small you know service could be calling um here you're showing some yeah javascript no don't show me your script i don't know if this is any better like this i don't want to see every script ever sorry no but uh the point is uh here with this you can call the production server and so it's nice and clean and so you have the matlab you know production version of it and then you can call it uh through a rest api with a production server and just having a second tier let's say of serving uh the data like you just did um i'm hoping maybe for next time we can put a kind of a graph i had one i don't know i must have like reverted my i i don't know i like i just like to click on plots i don't really i don't have a lot of patience for that especially it's javascript like you said i don't know um but yeah it's really just you know this is kind of how you would call i mean you can i haven't used flask in a while but you know really it would just be integrating you know that one call to like you know the prediction part just through the rest api and there's also um a uh let me just go back to there's probably a link somewhere um for a production server uh there's also a python client so you know whatever makes sense to you for how you're architecting your you know back end all right what else we got we have a question of uh whether you use matlab with python for statistical plot i'm not really sure i'll let you maybe give your uh you know your take on that yeah i guess um for me i mean i you know it's it's possible to kind of call whatever you like and whatever to use the plotting kind of through the uh interface but for me i tend to just plot in whatever i'm using at the time um just i also have no patience for graphics honestly so i mean i just it's pretty nice yeah i know that's why i make friends with people you've seen my apps clearly so you know for me it's okay that's why we hired you like you need somebody at home please don't do don't let me do this no we have eric for that uh hopefully he's listening he's gonna get some assignments um but so i tend to use you know i just kind of like matlab a lot for the plotting because i can just like click on something if i want i actually don't even like to click on things but i will use the mouse for that um but um that's kind of my my thoughts are just you know it's just easier it makes more sense to kind of use what you're using at the time um or use something altogether like you know i don't know whatever the cool thing is like d3 or like whatever cool visu viz thing people are using um you know you can always like do something outside you know like where we showed just a basic html page you could be using tableau or something fancy um or even cabana like i have a couple examples of that so um but it's definitely possible if there's something that you don't find in one language and i keep just clicking around because i wanted to uh show the um file exchange because a lot of times you'll be able to find uh the examples that you know if there aren't plots that you see right there you can just find it in the file exchange sometimes so all right good one what else we got uh what else do we have um i'm a researcher working on matlab um do i get an incentive to shift to python especially in the context of deep learning and machine learning well that's not a pure one but um what do you think i think there's yeah i mean yeah i think i mean there's a lot of a lot of questions about actually a couple of came up on um you know in the instagram feed and things like that too and i think you know there's you know there's i think there's always value of learning things in different languages i mean for me it makes sense you know but if you're you know depending on what you're researching you know and you already know one you know you could just stick with that and then um a lot of times especially with the higher level language once you're comfortable with one it's pretty easy to pick up the other just remember the zero versus one based and the brackets so you can just use the cheat sheet um but i mean that's kind of my my thoughts and like especially you know in terms of there's a lot of beginners a lot of beginner questions and it's great because for me you know i was just a scientist like i i don't have any i've never even made it through a computer science course i dropped every single one right at the drop deadline it was awful um so i mean don't tell anyone just kidding whatever they know it's more secret that's why i explain things i just do use real words man but you know it's uh like my my background is like solving the problem you know so for me it was just like oh whatever i find the first example looks like i need um and so for deep learning and machine learning i'll tend to you know there are a lot of you know papers that you're reading you know you can always find the code in those you can run that you know i think i really think if you are familiar with one it's very easy to pick up the other some of the details you might need to you know look but there's examples and things that will really help you and uh absolutely yeah i was gonna like i i love them yeah it was gonna say oh dude no no no deep d tensorflow or whatever by touch i just wanna use apps yep and so that's that's really one of the things that i don't have enough stuff here i don't want to like go uh too crazy on the time um but you know the deep learning um apps and the machine learning apps are great flooring for you know this is something that um okay i should bring like data in but uh we can i mean we can show examples there's a bunch of stuff here you know this will just this will do just fine uh but you know you can try all of the different models you know whether you have time to look into every single one of them to take all these courses on them um you know you can just poke around oh gosh what did i choose googling that's crazy i know like yeah that one's like actually looks really cool so it looks like really fancy and awesome um so that's why so like you know this is the kind of stuff that i really value and you know you saw maybe very very briefly there that you can um just bring in like the you know networks other people have trained move things around i won't because it'll break just kidding you can break it uh and then you can change stuff so that's one of the things that is really nice um you know take take whatever research is out there and start from that and then um try to understand what's going on and you know make your adjustments so uh yeah that's i don't know if that answers the question very directly but um i mean as i said i don't think there's just a real good answer to that i mean for me um to be really honest with you um i i read a lot a lot about machine learning and learning learning never never needed money in myself and i mean i do that i just don't know like [Music] um yeah exactly exactly and anything i think you know that's the other thing if you're just getting started we have the on ramps you know we could oh my gosh i'm getting so confused must be um totally losing it now i'm sorry everyone uh no i'm not sorry not sorry deal um but the uh you know anyways i just wanted to bring something in it doesn't make any sense i'm not even looking at this but uh just to show with a better example that now that's good i mean like i bought a couple of books about how to do machine learning with um with python and then i saw this those thousands of xt boosts and lots of different frameworks you know like you know scikit-learn and you need to know all of the different algorithm but then here what i like about this application is that you can just click and then you select all of the different algorithms you don't need to have a phd in all of the different domain yeah this is whenever i of course it's crashing i have like 50 things open right now um but so i was going to say like that's people like me i'm like even if i do have a phd in machine learning and you studied and published and everything i still like i just click a button and i use whatever like looks the best the confusion matrix it's sad no well i mean for that kind of stuff yes have you i've been running covid models since like september so my linux machine right now is keeping me warm um but it's just running model over model after model and i can just click on stuff and like check it out it's no big deal that's okay and then it changes every day remember you we are all a copy pastor in the end in the end exactly i copy paste and then i stop using the mouse all right any oh simulink that was the one we didn't get so um we yeah absolutely is possible um you can basically just use the same things that we've been talking about um there are like from simulink you can use the matlab function block and like you know a lot of people would put like a tensorflow model or those kinds of things you know whatever we had showed before on um calling matlab or calling python code from matlab you would just put that in matlab function block no big deal um and then you know same from uh you know calling it from python you know just like we said you can pretty much use whatever is in the uh matlab that you have so uh no problem and then um there's also the simulink compiler you can um think through you know depending on what you're trying to do i i am absolutely not a simulink expert i can run models from the dock uh so we can we can talk to you again we can maybe even come back with another um stream or some videos on that uh because there's a lot of different things that people will want to do like optimization kinds of things um and then this is a pretty good example uh and we'll we'll be hopefully working on some more here's seong so we hear a lot about this uh you know just getting value and a lot lots of matlab simulink stuff uh you know no problem well that sounds good i didn't know this one um we do have a question that is probably kind of in this direction is uh it's an engineering question from you know how i perceive it there's three parts to it how do i build a cellular network uh how do i draw buildings and it's floor and simulating them especially in cellular communication and the concept of ai in matlab that's it's just three small questions yeah no big deal all right i don't know yeah yeah we'll go ahead and take that one a couple minutes yeah so i want to kind of wrap up here soon just i don't i mean i probably should i think i have like a meeting or something it's really lame um but so i wanted to oh crap where is this okay here we go yeah i know i really need to change that it's like always shows up to whenever i like use my you're like you look cool that's my one whenever i'm like in conferences and stuff like believe me i know what i'm talking about um i do where did that go i have so many tabs open i'm losing my mind okay so the best places to look are uh and at least for for matlab stuff in the matlab documentation so i do not know about the uh sorry i am totally losing it i do not know much about simulink as i have uh disclaimered many times that's not the right word um but you can find there is like a wireless here it is here here yeah so that looks cool um but yeah there are a lot of great um tools for this like even just like radar i think there's a yeah the rf uh toolbox you know those kinds of things there's great visualizations 5g i mean that's a thing and you can do that so that's we've like i know i can do that i feel like i can do that because of your demonstration that was very powerful good good good that's but i mean hey this is how it works you know but there's actually a ton i think uh who somebody does a bunch of videos on our channel for these so i mean even just subscribe subscribe here uh and you know there are always uh you know cool examples in that area so that's that's kind of my advice just look for some examples uh look for videos that uh experts have created and start from there uh and then you said joanna's um ai page wherever it may be is really fantastic for um okay i totally lost it but uh it's really great way to start and um the examples like we even showed from uh the doc you know all of the ai ones even you can just call right there and like run in your browser so that's a really really great way to get started um just poking around and like seeing what's interesting like especially with uh grash that was the wrong one deep learning crap quincy it's the end you don't want us oh my gosh you don't want to show that right i do not i don't know yeah htlc that was like going back to my um assembly fears so if you just go to your examples you know you can even see like oh hey i'm working on you know time series so let's use this one you know so it's very easy to just try and again there's a lot of courses uh for me i just i i think you know doing it and uh figuring it out as you go is is the best way uh to do so um we have the last one um i think i'd like to take this one it's uh it's a difficult question but um why is the matlab heavies compared to python and i think here we need to really emphasize the fact that those are two different things like python is only the interpreter and matlab has the language itself but it has a lot of pre-built packages with it and so you don't compare apple to apple and like we have all of this environment that comes with it that you've shown uh so what do you think either yeah that's definitely what i would say too and i think they also you know um you know with python you pip install whatever you want you know so you don't necessarily just hit go and like get everything you need so i think that's a lot of it too it's it's more um i mean obviously you can pick and choose when you're installing matlab um and then get it as you need but you know i think that's one of the things that really makes a big difference like in addition to the examples the apps like those kinds of things um definitely are like heavier i guess in terms of like lightweightness um but that's that's sort of the value where you don't have to you know install extra things it's kind of just right there uh and then you can have that kind of um mechanism if you wanted like also even matlab online people will use and like cloud versions docker you know like you can kind of get a later weight you know matlab even like deployed matlab um some people will use if you don't you know if if you don't want all of the interactivity and things on your machine so um yeah that's a fair question definitely don't be afraid we're here we're here to answer it i think we pretty much got a lot of them at least well i'm not looking at the comments so i'm assuming um but i wanted to oh there was i i will just kind of maybe wrap up there was somebody had asked a couple of people asked in the um uh stories you know what why do you do one based indexing you know python other languages all of the languages basically are zero-based matlab is one based what were you thinking um i won't speak for cleve i will because we're friends but um he like you know matlab was created by a linear algebra professor for linear algebra and you know developed over time and by four engineers scientists you know so people that think of one as like mathematically like the first you know when even um verbosely i guess it's not right either but you know the first element of something or you know you're the uh first part of the set or you know those kinds of like mathematically thinking um anyways that's that's kind of where it came from um so whatever is your philosophy i think you know i just get used to whatever i need to at the time but you know for me it's i i came from a math and physics background so it a lot of matlab really just speaks to me because of that it's like just looks like math i can write math um and you know you like i whenever i want to index like one through ten i index one through ten not zero colon like range ten but that's only nine of them or something i don't know so uh michael is saying also uh michael creature our new colleague is saying uh fortran is one based too that's right and he has a good point you got that right like that's exactly right i've seen any physics background yeah exactly everybody that was our joke you like and ah is one based there you go so everything is one based sin yeah all the cool stuff anyway fortran that's right um but you know hey that's that's where a lot of uh matlab kind of stuff came i mean like the you know uh mathematics you know that's that's uh the roots so um yeah i think this was really fun i think i'm like like brain dead basically now there's like so many awesome questions and we're very excited about this and we have so much to say um hopefully uh you'll join us again sometime we have a lot of links that we can pass on for more info like more details and examples and things like that this was just more um you know conversational hopefully and uh you know answering some questions about getting started and getting going um anything else um well parting thoughts is it true that fortran is the fastest language i think that's a pretty good question to answer right now to conclude fortran is the fastest language well it is definitely well it's very fast um i have no idea i i won't i know that's how you get the clicks we should have started with that we're like we're gonna have a great debate on what is the fastest language and i mean i think it's kind of relevant in a sense that you know it's still running on a lot of lots of clusters and here ben am is saying yeah because like cfd is running on fortran like lots of cfd codes that are parallelized on super high performance computers and stuff and a lot of our i think internals are still running on on fortran like the base library like right a pack blast stuff like that yeah you know like it's still really good but it's just like some internals of what we actually also have in matlab yep so yeah and that that's also common especially like uh we always joked in the math team you know it's like uh you can't use uh knowledge of fortran to like age people like how long they've been programming or something because it's like we use it all the time in math and in physics and science so that's absolutely fair um and yeah you can call fortran routines i got it uh sub routines i'm sorry um you can do you know same with python you can do it one or the other so uh yeah i love it and i love this conclusion it's a really good one like you know python is just no different we can just we can do it i'll call just like you call c java fortran whatever you like you know um and so yeah that that is a great way to end it thanks oh my gosh we did it we did it all right awesome yeah this is super fun thank you for all of your awesome questions and um we'll hopefully see you back another time we'll keep you know stay tuned we'll um you know have more live streams on more of the topics that you've been asking about and yeah thanks very much thank you yawn too this was fun you
Info
Channel: MATLAB
Views: 13,561
Rating: 4.9127727 out of 5
Keywords: work from home live, matlab, simulink, mathworks, matlab tutorial, time series data in matlab, python
Id: RlMgQDvvAFQ
Channel Id: undefined
Length: 54min 50sec (3290 seconds)
Published: Thu Feb 11 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.