請點擊輸入圖片描述
01script writing的步驟
A.進入編寫腳本的頁面
A. Enter the scripting page
B. 輸入程式
B. Input program
C. 運行程式,點擊F5,會跳出保存該文件的頁面,文件名不可以數字開頭。
C. Run the program, click F5, the page for saving the file will pop up, and the file name cannot start with a number.
D.點擊保存后,程序開始運行
D. After clicking save, the program starts to run
02常用語句的使用
A.If elif el語句
格式:
If condition1
Statement1
Elif condition2
Statement2
El
Statement3
End
B.switch語句
格式:
Switch expression
Ca value 1
Statement1
Ca value2
Statement2
...
Otherwi
Statement
End
C.while語句
While expression
Statement
End
(prod為階乘函數,1e100,科學計數法,為1*10的100次方)
D.for語句
For variable=start:increment:end
Commands
end
03編寫程式的TIPS
1. 編寫程式前;clear all,刪除所有變量;clo all,關閉所有圖形。
2. 使用分號;不用將每一個指令都顯示出來。
3. 用...換行
4. 宕機時,ctrl+c
1. Before writing the program; clear all, delete all variables; clo all, clo all graphics.
2. U micolons; do not need to display every command.
3. U... to wrap
4. When down, ctrl+c
參考資料:谷歌翻譯
本文由LearningYard學苑原創,如有侵權請聯系刪除。
本文發布于:2023-02-28 21:08:00,感謝您對本站的認可!
本文鏈接:http://www.newhan.cn/zhishi/a/1677730090100626.html
版權聲明:本站內容均來自互聯網,僅供演示用,請勿用于商業和其他非法用途。如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除。
本文word下載地址:matlab階乘(matlab階乘函數代碼).doc
本文 PDF 下載地址:matlab階乘(matlab階乘函數代碼).pdf
| 留言與評論(共有 0 條評論) |