matlab的实验报告,MATLAB实验报告(8个实验).doc

PAGE

PAGE 3

四川师范大学MATLAB语言实验报告1

系   级   班       年   月   日

实验名称:Intro, Expressions, Commands

姓名      学号          指导教师        成绩

Objective

The objective of this lab is to familiarize you with the MATLAB program development environment and to develop your first programs in this environment.

Using MATLAB

Starting MATLAB

Logon to your computer and start MATLAB by double-clicking on the icon on the desktop or by using the Start Programs menu. MATLAB Desktop window will appear on the screen.

The desktop consists of several sub-windows. The most important ones are:

Command Window (on the right side of the Desktop) is used to do calculations, enter variables and run built-in and your own functions.

Workspace (on the upper left side) consists of the set of variables (arrays) created during the current MATLAB session and stored in memory.

Command History (on the lower left side) logs commands entered in the Command Window. You can use this window to view previously run statements, and copy and execute selected statements.

You can switch between the Launch Pad window and the Workspace window using the menu tabs under the sub-window on the upper left side. Similarly, you can switch between the Command History and Current Directory windows using the menu tabs under the sub-window on the lower left side.

Executing Commands

You can type MATLAB commands at the command prompt “>>” on the Command Window.

For example, you can type the formula cos(π/6)2 sin(3π/8) as

>>(cos(pi/6) ^ 2) * (sin(3 * pi/8))

Try this command. After you finish typing, press enter. The command will be interpreted and the result will be displayed on the Command Window.

Try the following by observing how the Workspace window changes:

>> a = 2; (Make note of the usage of “;”)

>> b = 3;

>> c = a ^ 4 ? b ? 5 + pi ^3

You can see the variables a, b and c with their types and sizes on the Workspace window, and can see the command

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值