FOR loops in MATLAB: Using loops for plotting

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • This screencast gives three quick examples of using FOR loops to perform some common plotting tasks. First we see how to quickly plot several columns of data from the same data set on a single set of axes. Then, we use a FOR loop to create a subplot. Finally, a FOR loop is used to sample from a data set and plot the points as markers.

КОМЕНТАРІ • 32

  • @Ksensei41
    @Ksensei41 12 років тому

    Had the problem with only the last plot() of the loop being done. Your video helped me, thanks!

  • @childprodigy37
    @childprodigy37 10 років тому +1

    This was extremely helpful. Thanks for the upload.

  • @yaboyflyhd2668
    @yaboyflyhd2668 3 роки тому

    Thank you so much, this was exactly what I was looking for!

  • @ahmedshaaban3813
    @ahmedshaaban3813 5 років тому

    Excellent work, sir. Thank You.

  • @nerflirui
    @nerflirui 12 років тому

    Very nice and detailed tutorial, thank you!

  • @troclan9461
    @troclan9461 4 роки тому

    thank you very much! I have to turn in my homework today.

  • @Praveenrareboyz
    @Praveenrareboyz 7 років тому

    oh man, you saved my time. Thanks a lot.

  • @petriforsstrom5115
    @petriforsstrom5115 8 років тому

    Very good and helpful. Thank you!

  • @helpmeimconfused
    @helpmeimconfused 4 роки тому

    You sound like Patrick Bateman from American Psycho. Helpful tutorial too

  • @sahilabeegum6060
    @sahilabeegum6060 8 років тому +1

    informative vedio. Thank You. Could you please explain how to give the legends when we plot graphs using for loop

  • @hossenalharbi8325
    @hossenalharbi8325 11 років тому

    Excellent, i did not complete the video, however, I solve my problem.
    Thanks

  • @rupertgoughswallow
    @rupertgoughswallow 13 років тому

    Thank you - *exactly* what I was looking for!

  • @MyMimi321
    @MyMimi321 10 років тому

    Very useful thank you.

  • @Thrivedh23
    @Thrivedh23 4 роки тому

    adding titles to that plots will give good impression, can u do that?

  • @desaigeneral
    @desaigeneral 10 років тому +1

    Thank you!!

  • @John-qt5em
    @John-qt5em 7 років тому

    How do you add a legend inside a FOR LOOP? For example, in the plots,you created in the first two examples.
    Thanks

  • @owaiszarinkhan1051
    @owaiszarinkhan1051 2 роки тому

    for i=1:length(B)
    plot(B{i}(:,2),B{i}(:,1), 'y' ,'linewidth',1.45);
    Please explain this in image processing for brain detection

  • @danishali2838
    @danishali2838 10 років тому

    very helpful

  • @xera0dementa
    @xera0dementa 11 років тому

    Thank you so much for this video ..it solved my problem :)
    but i have one doubt..i plotted a fourth degree polynomial. I attempted to curve fit a 4th degree curve through my data points using 'basic fitting' option ..but i am getting an error message :
    'Polynomial is not unique; degree>=number of data points'
    please help me out :(

  • @youxizhang1171
    @youxizhang1171 6 років тому

    thanks dor your vedio,may i know how to add legend to each line after 3 loops ?

  • @m2omara
    @m2omara 12 років тому

    thanks a lot...

  • @tuckerkeeney3654
    @tuckerkeeney3654 3 роки тому

    Genius

  • @desaigeneral
    @desaigeneral 10 років тому

    I want to drw each lines repeated in plot with diff colors and markers , also the legends. Help me.

  • @pixarsnewhero
    @pixarsnewhero 12 років тому

    Can anyone help me to find out how i can give distinct line styles and colours to each plot that is drawn in the for loop in the first plot drawn in this video..? Thank you.

  • @tavanamnaveen
    @tavanamnaveen 7 років тому

    Sir, Please plot plank radiation law

  • @britainF1
    @britainF1 11 років тому

    Hi, can anyone tell me how to add a legend to a plot where the legend refers to the markers rather than to the linestyle?
    I have a plot with 5 curves and 5 sets of distinct style markers made with a nested FOR loop (with the method shown in video).
    I would like the legend to denote the plots by the marker styles rather than by the curve line styles. However, I'm not aware of any way to do so.

  • @Weeedyyy
    @Weeedyyy 11 років тому +3

    Is this Seth Rogen speaking?

  • @poelaertpieterjan
    @poelaertpieterjan 11 років тому

    I still have some problems. I have a normal plot in 2D which works if i cut the for loop away, the for loop comes after it. If I then paste the for loop back it only shows the figure inside the for loop and not anymore the plot before the for loop, only the figure inside the loop. Does anyone know how to solve this?

  • @musama8771
    @musama8771 4 роки тому

    Mac looks gross

  • @GerhardVeldmanEng
    @GerhardVeldmanEng 12 років тому

    Thanks! Very good tutorial!