calc_area.m

来自「matlab programming for engineers(2nd)书籍源」· M 代码 · 共 7 行

M
7
字号
%  This m-file calculates the area of a circle,
%  and displays the result.
radius = 2.5;
area = pi * 2.5^2;
string = ['The area of the circle is ' num2str(area)];
disp(string);
  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?