Matlab M-Files Tutorial
Matlab M-Files Useful Resources
Selected Reading
- Matlab M-Files - Import Data
- Matlab M-Files - Functions
- Matlab M-Files - Run
- Matlab M-Files - Create & Save
- Matlab M-Files - Introduction
- Matlab M-Files - Home
Matlab M-Files Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Matlab M-Files - Run
Matlab M-Files - Run
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 −

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