MATLAB: How can i save a list of commands using m files

.m files

b=5; h=3; a=0.5(b*h);

Best Answer

File> open new file
Copy your commands, save in that. Run this file (F5) when you want to execute.