Hypotenuse
Using matlab:, you can:
- “Run a Single Function” on page 25-11
- “Run Multiple Functions” on page 25-11
- “Provide Command Options” on page 25-12
- “Include Special Characters” on page 25-12
Run a Single Function
Use matlab: to run a specified statement when you click a hyperlink in the Command
Window. For example, run this command:
disp('Generate magic square')
It displays this link in the Command Window:
When you click the link, MATLAB runs magic(4).
Run Multiple Functions
You can run multiple functions with a single link. For example, run this command:
disp('Plot x,y')
It displays this link in the Command Window:
When you click the link, MATLAB runs this code:
x = 0:1:8;
y = sin(x);
plot(x,y)
Redefine x in the base workspace:
x = -2pi:pi/16:2pi;
Create Hyperlinks that Run Functions