English 中文(简体)
Matlab M-Files - Run
  • 时间:2024-09-17

Matlab M-Files - Run


Previous Page Next Page  

In the previous chapter, we have seen how to create and save a m-file. Now in this chapter, we will write a simple code and run the same.

Following is the code which will run inside the firstmfile.m


a = 5; b = 7;
c = a + b
d = c + sin(b)
e = 5 * d
f = exp(-d)

This is how it will look inside MATLAB editor −

Run

Cpck on the Run button as highpghted above to see the result inside the command window as shown below

Command Window Advertisements