How to Write a MATLAB Program - MATLAB Tutorial

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024
  • Captions available in french and spanish.
    Learn how to write a basic MATLAB program using Live Scripts and learn the concepts of indexing, if-else statements, and loops.
    Learn more about MATLAB: goo.gl/8QV7ZZ
    See what's new in the latest release of MATLAB and Simulink: goo.gl/pgGtod
    Free MATLAB Trial: goo.gl/yXuXnS

Комментарии • 134

  • @gregolatkaa
    @gregolatkaa 3 года назад +115

    This guy's energy just makes it so much easier to learn from a video compared to so many tutorials for other programs

    • @lilacs9848
      @lilacs9848 3 года назад +1

      @Avery Colton no one gives a single fuck, this is how people input their insta credentials and get themselves hacked. asshats

    • @greatcesari
      @greatcesari 2 года назад

      @@lilacs9848 You are right, except...
      this is an educational guide for a well established software tool created by the developers themselves, and not a "how to install _Game X_ for free" tutorial.

    • @ika_0420
      @ika_0420 2 года назад

      Correct... 💯

  • @owaisathar6225
    @owaisathar6225 4 года назад +53

    Been through a lot of tutorials,,, but this one is the best, as it explains everything without focusing too much on any of the boring concepts of programming ,,, Loved it

    • @johnwattson5042
      @johnwattson5042 4 года назад

      Respected Mr. Owais athar , I read your comments and I will suggest you to learn Matlab from the Matlab channel so that you may have better ideas related to programming applications. Matlab is a powerful tool, that is used in many engineering applications. I found the below channel useful for Matlab.
      ruclips.net/channel/UCrWVyY81cjpL460aHNV3RXA

    • @think3rofficial
      @think3rofficial Год назад +1

      With any other programming language, you’d be doing it by now

    • @urnoob5528
      @urnoob5528 21 день назад +1

      @@think3rofficial fr

  • @1inspiration466
    @1inspiration466 4 года назад +38

    The best tutorials are long and detailed but feel short and simple. For me, this guy definitely accomplished that.

    • @gregoryfenn1462
      @gregoryfenn1462 3 года назад

      ? It's 14 mins, is that long?

    • @Unaboner
      @Unaboner 3 года назад

      @@gregoryfenn1462 long for the small amount of concepts he covered

  • @EngineeringwithDrKelseyJoy
    @EngineeringwithDrKelseyJoy 2 года назад +5

    I like how this video starts in the MATLAB command window then moved into script files. I find that's really helpful too.

  • @unsung777
    @unsung777 2 года назад +7

    Thanks for a very straightforward tutorial. Cheers!

  • @KorbenDenver
    @KorbenDenver 5 лет назад +11

    I love how you chose "The 5th Element"!

  • @lielgh6114
    @lielgh6114 2 года назад +3

    I wish all teachers were like him :( he is so cool guy

  • @kevinantony8247
    @kevinantony8247 Год назад +1

    Never seen anyone explain for loops and if statements very accurate

  • @abderrahimbelissaoui2739
    @abderrahimbelissaoui2739 4 года назад +15

    This is a good getting started especially for beginners.
    Me too, I just started making matlab teaching demos and many more.

    • @johnwattson5042
      @johnwattson5042 4 года назад

      Respected Mr. Abderrahim , I read your comments and I will suggest you to learn Matlab from the Matlab channel so that you may have better ideas related to programming applications. Matlab is a powerful tool, that is used in many engineering applications. I found the below channel useful for Matlab.
      ruclips.net/channel/UCrWVyY81cjpL460aHNV3RXA

  • @juan-andresward3144
    @juan-andresward3144 5 лет назад +3

    Hugely appreciate this video. Made my lectures make a little more sense 👍🏼. Thanks.

  • @DrJALAGHARI
    @DrJALAGHARI 2 года назад +1

    Nice video with easy explanation.

  • @danaelvalhor2063
    @danaelvalhor2063 6 лет назад +7

    Thanks man =D
    It helped A LOT me to begin with matlab

  • @lalitchetan4678
    @lalitchetan4678 2 года назад

    WHo is the guy? Make him do all the basic tutorials. he explains really well @MATLAB

  • @prajwalcsetty997
    @prajwalcsetty997 6 месяцев назад

    Explanation was very good

  • @nic1060
    @nic1060 2 года назад

    Does anyone know who this guy is? I would love to find other content created by him. Love his teaching energy!

  • @stellapateraki5528
    @stellapateraki5528 4 года назад +3

    love the discreet humour

  • @sakshisinghal1410
    @sakshisinghal1410 2 года назад

    A very good video for beginners

  • @KatB89
    @KatB89 Год назад

    The link to "latest on Matlab and Simulink" in the description may not be directing to the video that is intended

  • @muhammadrayyan4389
    @muhammadrayyan4389 2 года назад +1

    why can't I get any result when I typed "randomwalk(3)" on my live editor?...instead, I got "unrecognized function or variable 'randomwalk'"

    • @MichaeldeGans
      @MichaeldeGans Год назад

      That's because he did not care to show or explain the randomwalk and numFlips functions that he already created before recording I guess.

  • @muhammadanaskhan1151
    @muhammadanaskhan1151 4 года назад +1

    Its really good for beginners

    • @johnwattson5042
      @johnwattson5042 4 года назад +1

      Respected Mr. Muhammad Ana's khan , I read your comments and I will suggest you to learn Matlab from the Matlab channel so that you may have better ideas related to programming applications. Matlab is a powerful tool, that is used in many engineering applications. I found the below channel useful for Matlab.
      ruclips.net/channel/UCrWVyY81cjpL460aHNV3RXA

    • @ProgrammingwithFawadKhan
      @ProgrammingwithFawadKhan 4 года назад +1

      Thanks

  • @zahidullah1707
    @zahidullah1707 6 лет назад +2

    really appreciable this video man. but one point i am confused about is randomwalk.

  • @electronica-oscapy
    @electronica-oscapy 3 года назад +2

    What is the diference between script and live script? Thanks

    • @chukwuemekamba-onu7868
      @chukwuemekamba-onu7868 3 года назад

      you can google this; a detailed answer is posted on MATLAB answers. basically the live script is a better version of the script and only appears in versions from 2016b

  • @menosproblemos6993
    @menosproblemos6993 3 года назад +1

    The reason why I clicked on this was for its length. The other tutorials where about 1h long... It's seriously hard to keep focus for that long.
    The command text was a bit too small for watching on my phone though. You could size that up for an easier read.

  • @dava12333
    @dava12333 3 года назад +4

    It would have been great if you showed the Lebron function. That would have been useful.

    • @jarboer
      @jarboer 2 года назад +2

      I know this is an old comment but I wanted the same so I created it. Here's the code which I put in a separate file:
      function total = randomwalk(steps)
      currentSteps = 0;
      count = 0;
      while currentSteps < steps
      coin = randi([1,2]);
      if coin == 1
      currentSteps = currentSteps + 1;
      else
      currentSteps = currentSteps - 1;
      end
      count = count + 1;
      end
      total = count;
      end

    • @stud-op8df
      @stud-op8df Год назад

      @@jarboer function total = randomwalk(steps)

      Error: Function definition are not supported in this context. Functions can only be created as local or nested functions in code
      files.

  • @zinabeek4121
    @zinabeek4121 4 года назад +7

    hi, is randomwalk(n) a function ? i try it it´s not working!!

    • @TheLcp23show
      @TheLcp23show 3 года назад

      yeah i think randomwalk(n) is a function he already built for the purpose of the tutorial

    • @bibekrao57
      @bibekrao57 3 года назад +1

      @@TheLcp23show can you please attach any codes regarding this, I couldn't find the function

  • @beyondlimits8159
    @beyondlimits8159 4 года назад +3

    you sound like a minecraft youtuber.
    I assure you, this is a compliment

  • @maipyaar
    @maipyaar 4 года назад +1

    Thank you. This helps

  • @homelessm8
    @homelessm8 6 лет назад +2

    omfg thank you!!! this helps!!!

  • @etc_be_a_62harshshinde66
    @etc_be_a_62harshshinde66 3 года назад +1

    Hooray!

  • @ruhinabegum3736
    @ruhinabegum3736 6 лет назад +5

    sir, i have 5 variables, like A,B,C,D,E and i want to find 4 variables when A is constant , it is possible is matlab please answer me

  • @BruceWayne-dr9zh
    @BruceWayne-dr9zh 3 года назад

    Amazing explaination

  • @domingosmucuanha2449
    @domingosmucuanha2449 3 года назад

    Hi thanks for sharing this video. Is it possible to have a private tutoring? I really need this class in order to succeed in my course work.

  • @NareshKumar-bl3sy
    @NareshKumar-bl3sy 5 лет назад

    Nice work in short time

  • @farn69
    @farn69 3 года назад

    Great tutorial

  • @LaurenAnne6
    @LaurenAnne6 3 года назад

    Great video!!

  • @mariad1898
    @mariad1898 7 лет назад +1

    Muchas gracias.

  • @hfizhaikal8186
    @hfizhaikal8186 4 года назад

    Thank you for the video

  • @bensonaddo5926
    @bensonaddo5926 2 года назад

    Hello sir, my name is David and I was wondering if u could help me with my Matlab assignment which I kinda find it a little bit hard to do

  • @omarel-ghezawi6466
    @omarel-ghezawi6466 Год назад

    Excellent!

  • @user-wm5pj1qh3y
    @user-wm5pj1qh3y 4 месяца назад

    I am inspired to learn matlab

  • @jeannettecollins2903
    @jeannettecollins2903 4 года назад +1

    thanks! interesting and easy to learn!

  • @bantunitdgp
    @bantunitdgp 4 года назад

    Starting with MATLAB. Beginner's Guide: ruclips.net/p/PLsEIbHOtypISXCOtq8dcVlSFiJ_SPHdtx

  • @gian3517
    @gian3517 4 года назад +2

    What is random walk? And how do I replicate it?

    • @okeowofelix4537
      @okeowofelix4537 9 месяцев назад

      Can you provide the function program because it seem not to be responding on my end

  • @maryanbaraou6841
    @maryanbaraou6841 6 лет назад +1

    You do nice job ty frero

  • @giannisloukovitis1256
    @giannisloukovitis1256 7 лет назад +1

    that was nice. Thanks

  • @sypher294
    @sypher294 Год назад

    Hot take: less comments, more well named variables!

  • @pravinpalve3771
    @pravinpalve3771 5 лет назад +1

    %nice video man

  • @ac_nhi_cooler_hun
    @ac_nhi_cooler_hun 7 месяцев назад

    what is the randomwalk function, please help me I have an assignment due in 3 days

    • @AnGelo-nv1hx
      @AnGelo-nv1hx 5 месяцев назад

      was wondering the same... have you ever found it?

  • @shamalkumar7869
    @shamalkumar7869 3 года назад

    R.I.P. Lebron

  • @aobamoca
    @aobamoca 6 лет назад +78

    lebron traveled

  • @AnGelo-nv1hx
    @AnGelo-nv1hx 5 месяцев назад

    Would have been awesome to if you had defined function randomewalk()...

  • @rforrohitarorasirclasses6500
    @rforrohitarorasirclasses6500 3 года назад

    Very nice

  • @ginavoiceover517
    @ginavoiceover517 4 года назад

    It's purry easier to write a program from scratch but how abt findig an existing one and try to implement it i think it's the chalenge.

  • @zhiwarsami5737
    @zhiwarsami5737 6 лет назад

    very useful thanks very very much .

  • @deependrakumar6426
    @deependrakumar6426 6 лет назад +3

    how to defiene random function????

  • @pritomroy2465
    @pritomroy2465 2 года назад

    I thought R is running in a markdown document.

  • @fauzansyauqi2815
    @fauzansyauqi2815 3 года назад +1

    I dont get why he put (',' 's') in for else statement

    • @chukwuemekamba-onu7868
      @chukwuemekamba-onu7868 3 года назад

      I tried running the code without "(....., 's')" and it gives an error. I wonder what it's for

    • @fauzansyauqi2815
      @fauzansyauqi2815 3 года назад +1

      @@chukwuemekamba-onu7868 ya thanks mate, I do realize after that

  • @Falkenbergo
    @Falkenbergo 3 года назад

    R.I.P Lebron

  • @gopaltalukder441
    @gopaltalukder441 4 года назад

    How can i write anfis matlab code

  • @leonardmabele7446
    @leonardmabele7446 6 лет назад +3

    This works from what version of MATLAB. R2015a does not have the Live Scripts ...

  • @slokisofttech5958
    @slokisofttech5958 6 лет назад +1

    brilliant

  • @akaaleem2980
    @akaaleem2980 2 года назад

    video ets blurred at 4:15 mins

  • @Ohlookitsajosh
    @Ohlookitsajosh 5 лет назад

    Step 3: Profit

  • @meizaldiestu3055
    @meizaldiestu3055 5 лет назад

    please make a biogas production simulation tutorial using matlab

    • @dayanandselvarajan8819
      @dayanandselvarajan8819 5 лет назад

      Hi, did you get any info or methods to simulate biogas production ?

    • @meizaldiestu3055
      @meizaldiestu3055 5 лет назад

      Dayanand Selvarajan You can see the method used for biogas simulation in journals, can you make the program in the Matlab if there is a method?

  • @sureshbabu-nt3iz
    @sureshbabu-nt3iz 3 года назад

    Write a MATLAB code to plot 3 sinusoids (1 cosine and 2 sines) with respect to time. The
    cosine signal is the first harmonic having an amplitude = 10 V and frequency = 50 Hz, while
    the rest two are 3rd and 5th harmonics having amplitudes of 3 V and 1 V respectively. The
    total duration of the plot should be equal to 5 cycles of the 1st harmonic along with
    corresponding no. of cycles of the other two. In the same figure, plot the sum of these 3
    sinusoids as well. The total no. of sample points of these graphs should be 1000. All these
    waveforms should have different colours and a legend box should be available inside the
    plot to show the names of these 4 waveforms. The axes (both X & Y) of the plot should have
    proper labels and there should be grid lines as well.
    u know the answer??

  • @shenshen0821
    @shenshen0821 6 лет назад +9

    aww man Lols!

  • @DAECAkashKR
    @DAECAkashKR 3 года назад

    for i = 1:10000000
    disp ("thank you")
    end

    • @Ryaaan_n
      @Ryaaan_n Месяц назад

      omg your comment really helps me understand the concept better after typing the code into the command window of Matlab...THANKS😂

  • @pegcailla4625
    @pegcailla4625 4 года назад

    shift + > * 3

  • @annasahebdhon9090
    @annasahebdhon9090 5 лет назад +1

    Sir plz help me for my Matlab code. Facial expressions recognition

    • @johnwattson5042
      @johnwattson5042 4 года назад

      Respected Mr. annasaheb, you need to lean machine learning. I read your comments for facial expressions recognition and I will suggest you to learn Matlab from the Matlab channel so that you may have better ideas related to programming applications. Matlab is a powerful tool, that is used in many engineering applications. I found the below channel useful for Matlab.
      ruclips.net/channel/UCrWVyY81cjpL460aHNV3RXA

    • @ProgrammingwithFawadKhan
      @ProgrammingwithFawadKhan 4 года назад

      ruclips.net/channel/UCrWVyY81cjpL460aHNV3RXA

  • @shrikantstu4725
    @shrikantstu4725 6 лет назад

    new section not working on r2017a version

  • @fiveoneecho
    @fiveoneecho 5 лет назад +4

    Not going to lie, I'm not a huge fan of how this is like a weird combination of C-based languages, Lua, and Swift all at once...

  • @xuanji176
    @xuanji176 2 года назад

    hooray!!

  • @honantong
    @honantong 6 лет назад

    Hooray

  • @jorginhoapmyou
    @jorginhoapmyou 7 лет назад

    hooray!

  • @shahdadkotjoawaz2749
    @shahdadkotjoawaz2749 3 года назад

    #mirtechsolution's

  • @RahulKumar-vr4cm
    @RahulKumar-vr4cm 6 лет назад

    MATLAB.MATLAB.

  • @thealphazero_
    @thealphazero_ 2 года назад

    "aww man"

  • @tariqzk6964
    @tariqzk6964 3 года назад

    just like any programming language, things go downhill after learning loops.

  • @Hoppitot
    @Hoppitot 4 года назад

    y

  • @seggetauli6644
    @seggetauli6644 5 лет назад

    Interessante, video in italiano disponibili qui:
    ruclips.net/video/DfghsB-GhAI/видео.html

  • @leonhardeuler9839
    @leonhardeuler9839 6 лет назад +2

    MATLAB is similar to Python

  • @ahmednaji9065
    @ahmednaji9065 Год назад

    very fast your explanation dear

  • @seggetauli6644
    @seggetauli6644 5 лет назад

    Molto interessante, suggerisco anche il corso grautito di "Corsi Consulenze NPR", ruclips.net/video/nc1zk0DAJn0/видео.html

  • @blackspitit
    @blackspitit 3 года назад

    Matlab is the worst language programming that I have tried. And besides university, nobody is using it.

    • @blackspitit
      @blackspitit 2 года назад

      @Rosetta Stoned It sounds pretty stupid defining someone's career path for their language programming preferences. Using Matlab is mainly limited to research and teaching, but there are other LP that are much better and flexible than Matlab that are actually used for research purposes.
      I've worked with several LP but Matlab annoys me like any other.
      Arts requires thinking and someone needs to be smart in order to be a good artist. Working in research doesn't necessarily make you smart but it can also make one a stupid mediocre researcher.