首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
代做MMM 1041、代写MATLAB程序设计
项目预算:
开发周期:
发布时间:
要求地区:
MMM 1041 Computer programming with MATLAB
Coursework 1
Introduction:
This coursework is designed to help you revise your basic MATLAB knowledge that you
have gained in lectures 1-3. For each question you should write a script that contains the
answers. Save your scripts to disk with some sensible name for example, the Fle
containing the code for question one could be called Q1.m. Once you have Fnished all
the questions (or as many as you can manage), zip all your scripts up into a single zip Fle
and upload this to moodle. Name the zip Fle using the following format
Firstname_surname_studentid.zip. So for example my zip Fle would be called:
yong_ren_01234567.zip
In each .m Fle you generate, put on the Frst line your name and e-mail address – the
markers will use this e-mail address to give you feedback. For questions which require
you to write English sentences just include these as comments using the '%' character in
a script Fle. Try to include comments in the script Fles describing what the program is
doing – you will get marks for this.
Finally, please remember this is individual work and not group work. Work handed in
must be entirely your own and not copied from anyone else. By all means discuss the
coursework with your friends BUT then go away and write the programs yourself.
Q1: Variables
Evaluate the following functions at x=1.5
a) a=sin(x )
b) b=sin2
(x)
c) c=x
5
+x
4
+x
3
+x
2
+x
1
d) d=exp(sin(x )cos(x))
e) e=(x+1)(x−1)(x
2
+1)(x
3
)cos(x)
f) z=a+b
g) f =a+b
c+e
Q2: Arrays and plotting
a) Write a script to generate an array called 'x' with 100 points between -2p and 2p
Then evaluate the following functions between -2p and 2p
b) a=sin(x )
c) b=cos( x)
1
E
V
d) c=tan(x)
e) d=(e
x
−e
−x
)/2
f) Plot graphs of a and c
g) Calculate the mean, standard deviation of the data in array b.
h) Can you guess why the mean is not exactly zero?
Q3) Program How
A space capsule will re-enter the earths atmosphere from
space. The computer in the capsule uses it's radar to
check how high it is every 100ms, once the capsule is
only 1000 meters from the sea it deploys the parachute.
Once the capsule has hit he sea, the computer turns on a
transponder beacon which sends out radio signal
communicating the capsule's position to the rescue
ships.
Both deploying the parachute and turning on the
transponder beacon are handled by one program. Using
boxes to represent actions and diamonds to represent
decisions, sketch the structure of this program. The
program must contain the following boxes:
• Am I below 1000m?
• Am I at or below 0m?
You can use any program you want to do the sketch but export it to a pdf to make sure
the marker can open it. Include the pdf in your zip Fle as Q3.pdf.
Q4: Solving equations
a) Write a script to solve the following polynomial using the quadratic formula
x=−b±√b
2
−4 ac
2 a
270x2
+140x+1200 = 0
a=270
b=140
c=1200
2
Figure 1: An Apollo capsule
parachuting to an ocean landing
占
N
b) The speed of light in any material is given by the equation c=√ 1
ϵr ϵ0 μ0
where 'c' is the speed of light, the permittivity of free space is ε0=8 . 85418782 × 10-12
(m-3 kg-1 s4 A2
) and the magnetic permeability is μ0=4 π×10−7 (kg m s-2 A−2) . The value
of the relative permittivity ϵr , changes as a function of temperature according to the
equation ϵr=3( 1+
T−300
100 ) where T is given in Kelvin. Write a script to calculate the
speed of light at 400 kelvin, where ϵr , ε0 , T, μ0 are deFned as separate variables.
Q5) Give an example of the use of the following commands and describe in no more than
10 words per command, what the following commands do (Hint, the last two you can Fnd
in the MATLAB help). Use the '%' to include English text in your .m Fle:
a) clear
b) who
c) a semicolon do after a line.
d) sound
e) roots
f) abs
Use the comment character '%' to include you description under you example in the .m
Fle.
Q6: Processing 1D arrays
Whales keep becoming beached in the Lyme Regis on the
south coast of the UK. Your small company is developing an
underwater acoustic system to keep whales of the beach.
The system will work by using an underwater speaker system
which plays a whale distress call. It is your job to prepare the
digital sound Fle which the system will use. By working in
collaboration with a marine biologist you have obtained a
recording of whale song. You can Fnd this Fle in whale.zip on
moodle, download the zip Fle and extract the Fle
whale.dat.
Write a script to:
a) Load the Fle into an array called 'song', and plot a graph of
3
Figure 2: Whales in the
Atlantic.
the whale song. Using MATLAB, label the axis and put a title on the graph.
b) Make your script play the sound using the sound command. Hint: It plays 44100
samples (numbers) per second this must be the second argument to the sound
command). What happens if you play more/less than 44100 samples per second? Write
your answer in your script as a comment.
c) How many distinctive whale calls are there in the data, you should also be able to tell
this from looking at the graph. Write this as a comment in the script.
d) Use the size command to Fnd out how long the array song is, store the answer in a
variable.
e) The second whale call in the sample is the distress call you are interested in. By
looking at the numbers on the x-axis of your graph you will be able to tell at what position
in the array this distress call starts and ends. Make a second array which only contains
the distress call this should be called 'distress'.
f) Use the size command to Fnd out how long the array 'distress' is.
g) Your company wants the device you are designing to play 10 whale distress sounds in
a row one after each other. Make a new array containing ten distress calls one after each
other, and edit your script to play this sound.
h) How long is this array? If the computer turning 44100 elements per second, make your
script calculate the length of your new clip in seconds. To do this, Frst calculate the
length of the new array using the size command. Hint: The size function actually returns
a 2D array, containing the x and y size of any array. To do the calculation you will Frst
have to extract the correct element from the 2D array returned by the size function.
Q7: 2D Arrays
You are an engineer on a ship searching for oil. The ship has produced a topological (sea
depth) map of an area of interest. Your company now wants to drill a test well, however,
there are many underwater mountains around the site of interest. It is your job to
examine the topological data being produced by the ship and Fnd a suitable iat region
on the sea bed in which to drill.
a) The ship produces 2D topological (height) data and outputs this in a Fle called
'sea_bed.dat'. Load this Fle into an array and produce a 3D plot of the data. Hint:
MATLAB joins the points in 2D graphs with black lines by default, if there are lots of data
points this can make the graph look messy. Try adding the parameters
,'edgecolor','none' to the plot command to Fx this.
b) The height data in the Fle sea_bed.dat which the computers on the ship generated is
incorrect due to a miscalibration of the instruments in the ship. To correct for this error
you need to subtract 300 m from each data point in the array, the array will then give the
exact depth of each location below the sea's surface. Generate a new 2D array which
contains the corrected data and plot this.
4
c) Label the x, y and z axis of your plot. The ship records data in a resolution of one
data point per meter.
d) Calculate the size of the array contained within sea_bed.dat. Store the the x and y size
in separate variables, and then calculate the total area of your map in a third variable.
e) Locate a region on the sea bed which is relatively iat. Extract this region from the 2D
array to form a new array called drilling_site. Produce a 3D plot of this region, again label
the axis.
f) Now extract a single 1D slice across, your chosen drilling location. Plot this as a 1D
graph.
g) Calculate the maximum, minimum and standard deviation of 1D data strip taken
across your proposed drilling site.
5
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代写dts207tc、sql编程语言代做
2024-12-25
cs209a代做、java程序设计代写
2024-12-25
cs305程序代做、代写python程序...
2024-12-25
代写csc1001、代做python设计程...
2024-12-24
代写practice test preparatio...
2024-12-24
代写bre2031 – environmental...
2024-12-24
代写ece5550: applied kalman ...
2024-12-24
代做conmgnt 7049 – measurem...
2024-12-24
代写ece3700j introduction to...
2024-12-24
代做adad9311 designing the e...
2024-12-24
代做comp5618 - applied cyber...
2024-12-24
代做ece5550: applied kalman ...
2024-12-24
代做cp1402 assignment - netw...
2024-12-24
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!