MATLAB课后上机实验报告

时间:2025-02-21

《MATLAB程序设计与应用》实验指导书

实验一 matlab集成环境使用与运算基础

1,先求下列表达式的值,然后显示matlab工作空间的使用情况并保存全部变量。 (1)z1 程序:

.>> z1=2*sin(85*pi/180)/(1+exp(2)) 结果: z1 =

0.2375

2其中x

0.45

1 2i

5

2sin851 e

2

(2

)z2 程序:

12

In(x

>> x=[2,1+2*i;-0.45,5]; >> z2=0.5*log(x+sqrt(1+x*x)) 结果: z2 =

0.7114 - 0.0253i 0.8968 + 0.3658i 0.2139 + 0.9343i 1.1541 - 0.0044i

(3)z3

e

0.3a

e2

0.3a

sin(a 0.3) In

0.3 a2

,a 3.0, 2.9, 2.8,...,2.8,2.9,3.0

提示:利用冒号表达式生成a向量,求各点函数值时用点乘运算。 程序:

>> a=-3.0:0.1:30;

>> z3=(exp(0.3*a)-exp(-0.3*a))/2.*sin((a+0.3)*pi/180)+log((0.3+a)/2) 结果: z3 =

1.0e+003 *

Columns 1 through 4

0.0003 + 0.0031i 0.0003 + 0.0031i 0.0003 + 0.0031i 0.0002 + 0.0031i

Columns 5 through 8

0.0002 + 0.0031i 0.0001 + 0.0031i 0.0001 + 0.0031i 0.0000 + 0.0031i

Columns 9 through 12

-0.0000 + 0.0031i -0.0001 + 0.0031i -0.0001 + 0.0031i -0.0002 + 0.0031i

Columns 13 through 16

-0.0003 + 0.0031i -0.0003 + 0.0031i

Columns 17 through 20

-0.0006 + 0.0031i -0.0007 + 0.0031i

Columns 21 through 24

-0.0010 + 0.0031i -0.0012 + 0.0031i

Columns 25 through 28

-0.0019 + 0.0031i -0.0023 + 0.0031i

Columns 29 through 32

-0.0030 -0.0023

Columns 33 through 36

-0.0014 -0.0012

Columns 37 through 40

-0.0008 -0.0007

Columns 41 through 44

-0.0004 -0.0003

Columns 45 through 48

-0.0001 -0.0001

Columns 49 through 52

-0.0004 + 0.0031i -0.0008 + 0.0031i -0.0014 + 0.0031i -0.0030 + 0.0031i -0.0019 -0.0010 -0.0006 -0.0003 -0.0000 -0.0005 + 0.0031i -0.0009 + 0.0031i -0.0016 + 0.0031i -0.0370 -0.0016 -0.0009 -0.0005 -0.0002 0.0000

0.0001 0.0001 0.0002 0.0002

Columns 53 through 56

0.0003 0.0003 0.0003 0.0004

Columns 57 through 60

0.0004 0.0005

Columns 61 through 64

0.0006 0.0006

Columns 65 through 68

0.0007 0.0007

Columns 69 through 72

0.0008 0.0008

Columns 73 through 76

0.0009 0.0010

Columns 77 through 80

0.0011 0.0011

Columns 81 through 84

0.0012 0.0012

Columns 85 through 88

0.0013 0.0013

Columns 89 through 92

0.0014 0.0014

Columns 93 through 96

0.0005 0.0005 0.0006 0.0007 0.0008 0.0008 0.0009 0.0009 0.0010 0.0010 0.0011 0.0011 0.0012 0.0013 0.0013 0.0014 0.0015 0.0015

0.0015 0.0016 0.0016 0.0016

Columns 97 through 100

0.0017 0.0017 0.0017 0.0018

Columns 101 through 104

0.0018 0.0018

Columns 105 through 108

0.0020 0.0020

Columns 109 through 112

0.0021 0.0022

Columns 113 through 116

0.0023 0.0024

Columns 117 through 120

0.0025 0.0026

Columns 121 through 124

0.0027 0.0028

Columns 125 through 128

0.0030 0.0031

Columns 129 through 132

0.0033 0.0034

Columns 133 through 136

0.0036 0.0037

Columns 137 through 140

0.0019 0.0020 0.0022 0.0024 0.0026 0.0029 0.0031 0.0034 0.0038 0.0019 0.0021 0.0023 0.0025 0.0027 0.0029 0.0032 0.0035 0.0039

0.0040 0.0041 0.0042 0.0043

Columns 141 through 144

0.0044 0.0045 0.0046 0.0047

Columns 145 through 148

0.0049 0.0050

Columns 149 through 152

0.0054 0.0056

Columns 153 through 156

0.0060 0.0062

Columns 157 through 160

0.0068 0.0069

Columns 161 through 164

0.0076 0.0078

Columns 165 through 168

0.0085 0.0088

Columns 169 through 172

0.0096 0.0099

Columns 173 through 176

0.0108 0.0112

Columns 177 through 180

0.0123 0.0127

Columns 181 through 184

0.0051 0.0057 0.0064 0.0071 0.0080 0.0090 0.0102 0.0115 0.0131 0.0053 0.0059 0.0066 0.0074 0.0083 0.0093 0.0105 0.0119 0.0135

0.0139 0.0144 0.0148 0.0153

Columns 185 through 188

0.0158 0.0163 0.0168 0.0174

Columns 189 through 192

0.0180 0.0185

Columns 193 through 196

0.0204 0.0211

Columns 197 through 200

0.0233 0.0241

Columns 201 through 204

0.0265 0.0274

Columns 205 through 208

< …… 此处隐藏:5734字,全部文档内容请下载后查看。喜欢就下载吧 ……
MATLAB课后上机实验报告.doc 将本文的Word文档下载到电脑

    精彩图片

    热门精选

    大家正在看

    × 游客快捷下载通道(下载后可以自由复制和排版)

    限时特价:7 元/份 原价:20元

    支付方式:

    开通VIP包月会员 特价:29元/月

    注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
    微信:fanwen365 QQ:370150219