*Note: I've read similar questions but can't still make it work given that I'm plotting four y lines using a single plot() function. For loop can be used, if a programmer is sure about how many times he or she requires to perform a specific task. But rather than using the do-while loop in Matlab, there are two kinds of the loop that are utilized as do operations. How can I append the legend to the already existing legend, instead of just replacing it? There is no loop as do while Matlab, but other programming languages, such as C, C++ has this loop to execute a specific function in the program. However, if the for loop happens more than once, the new legend does not append to the existing legend. If the for loop happens only one time, then I can easily add a legend using the legend() function. I have a for loop that looks somewhat like these: RowToPlot =2 Įach plot line plots 4 lines in the y axis, and depending on the value in Num, the for loop could repeat and more lines could be plotted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |