上机实验报告(完整实验代码)

更新时间:2023-11-28 13:27:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

《MATLAB程序设计与应用》

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

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

2sin850(1)z1?

1?e2程序:

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

0.2375

(2)z2?程序:

1?2i??21In(x?1?x2),其中x??? ?0.4552??>> 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

e0.3a?e?0.3a0.3?asin(a?0.3)?In,a??3.0,?2.9,?2.8,...,2.8,2.9,3.0 (3)z3?22提示:利用冒号表达式生成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

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.0031i -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.0002 + 0.0031i -0.0005 + 0.0031i -0.0009 + 0.0031i -0.0016 + 0.0031i -0.0370 -0.0016 -0.0009 -0.0005 -0.0002

-0.0001 -0.0001 -0.0000 0.0000

Columns 49 through 52

0.0001 0.0001 0.0002 0.0002

Columns 53 through 56

0.0003 0.0003

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.0003 0.0005 0.0006 0.0008 0.0009 0.0010 0.0011 0.0012 0.0013 0.0004 0.0005 0.0007 0.0008 0.0009 0.0010 0.0011 0.0013 0.0014

0.0014 0.0014 0.0015 0.0015

Columns 93 through 96

0.0015 0.0016 0.0016 0.0016

Columns 97 through 100

0.0017 0.0017

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.0017 0.0019 0.0020 0.0022 0.0024 0.0026 0.0029 0.0031 0.0034 0.0018 0.0019 0.0021 0.0023 0.0025 0.0027 0.0029 0.0032 0.0035

0.0036 0.0037 0.0038 0.0039

Columns 137 through 140

0.0040 0.0041 0.0042 0.0043

Columns 141 through 144

0.0044 0.0045

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.0046 0.0051 0.0057 0.0064 0.0071 0.0080 0.0090 0.0102 0.0115 0.0047 0.0053 0.0059 0.0066 0.0074 0.0083 0.0093 0.0105 0.0119

本文来源:https://www.bwwdw.com/article/vd1t.html

Top