You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -452,7 +452,9 @@ ylabel('f(x)','FontSize',16);
452
452
box on;
453
453
```
454
454
455
-
These commands could be typed individually into the command prompt, or equally saved into a script so that all of the commands can be run together. So plot the cosine of x as well, we can run the following commands:
These commands could be typed individually into the command prompt, or equally saved into a script so that all of the commands can be run together. To plot the cosine of x as well, we can run the following commands:
The 'hold' command is required to prevent the plotting of the cosine wave overwriting that of the sine wave. If, instead, you wanted to draw the cosine in a separate graph, then first create a new empty figure.
465
469
466
470
To include a legend and change the appearance of the axes labels, you could run the following commands. Note that the command 'gca' is asking Matlab to change the current axes (i.e. most recently drawn/clicked in):
Functions take inputs and typically produce outputs, and a simple function is shown below. Note the use of (square) brackets for grouping the output arguments and the parentheses for grouping the input arguments:
484
490
485
491
```
@@ -711,7 +717,7 @@ R must be installed before RStudio.
711
717
712
718
RStudio default layout consists of three panels. At left there is a panel showing the code executed plus eventually the textual output. At right, the top panel show the current variables/functions loaded in the environment (top) and the bottom panel allows the access to the file system. When a script is opened the left panel is split in two.
0 commit comments