代做Assignment for MATLAB Workshop帮做Matlab编程

Assignment for MATLAB Workshop

Due date: November 9, 2024 at 11:00 pm

Q1 Solving function

Matlab can be used to solve the numerical result of a function, and its differential and integration. We can first create a “function file” to present this function f(x), which returns the corresponding output for a given input. In this question, your task is to fill the function file.

Please do not modify any code in “Q1.m”.

1.1 Define the function to be solved.

We  have  a  completed  function  f(x) = x * J1 (x) — 2ln[0.7sin(x) + 0.86]   to   be solved, where J1 (x)  is the Bessel function of the first kind. We first need to define this function on Matlab by writing a “m file”, whose input is “x” and output is “f(x)” .

TASK ONE (10%)

Your task is to fill the file “f.m” corresponding to above function. After you have finished it, running the “Q1.m”, you are expected to see the followed information on the Command Window.

Exact y list:

3.0515

0.3016

-0.3017

1.1958

Your result:

3.0515

0.3016

-0.3017

1.1958

1.2 Plot the figure off(x).

Then we can plot the figure of f(x). We set the x range from -5 to 5, then compute the corresponding f(x). Continue “Q1.m”, you can see

the figure.

1.3 Compute differential value off(x).

We can solve the differential value off(x) on  x0   by first obtaining the form. f (x) then computing f (x0). An alternative method is shown as which can be used for complicated unknown functions.

TASK TWO (20%)

Your task is to fill the file “diff_f.m”, which solve the approximate differential value  off(x) on given “x” by above numerical method. After you have finished it, continue the “Q1.m”, you are expected to see the followed information. Here the accuracy   is dependent to that you chose.

Exact differential result: 0.665414

Your differential result: 0.665414

1.4 Compute integral value off(x).

For this function, it is difficult to write the integration form. We can use the numerical method that separate this integration to a discrete summation. To solve the integration off(x) from  xi   to  xf , we can cut the range into lots of pieces    {xi, xi  + △x, xi  + 2△x, … , xf} , and solve the corresponding f(x). Finally, we can obtain the approximate integral value by adding them up and multiplying  △x .

TASK THREE (20%)

Your task is to fill the file“integral_f.m”, whose input is“x_i”and“x_f”and output is integral value of f(x) from“x_i”to“x_f”. You are expected to see the followed information. Here the accuracy is dependent to that you chose.

Exact integral result: -0.026055

Your integral result: -0.026055

Q2. Axes rotation

Rotating the x-y axes counterclockwise through into x’-y’axes can be represented as where is the original coordinate and is the new coordinate after rotation. In this equation, we will plot the function  y  = x 2  +

5sin(3x) + cosh(x) − 1  at the original axes and the axes that being rotated counterclockwise through

2.1 Build the function.

TASK ONE (15%)

Your task is to finish the file ‘g.m’ , in which the input a vector  x(⃗) =

{x1, x2, … , xn }containing a set of values of x and the output is a vector

= {x1(2), x2(2), , xn(2)}. After finished it, running Q2, you are expected to see that at the

Command Window.

x         y     exact_y

-2.0000     -7.4724     -7.4724

0     -0.5211     -0.5211

2.0000       3.5515       3.5515

2.2 Plot this function

We set the x range from -5 to 5, and the corresponding y values are obtained from y = 5xsin(3x) − sinh(x + 0.5). In this part, we will plot the function from -5 to 5.

TASK TWO ( 20% )

Your task is to finish the file plot_function.m, which will plot x-y figure with input  x(→) ,  y(→) . The requirements are as followed.

1. line width is 2;

2. line color is black;

3. title is "y = 5xcos(3x)-sinh(x+0.5)";

4. x-label is "x";

5. y-label is “y".

You are expected to see that.

2.3 Rotation axes

In this part, we will rotate the axes counterclockwise through  −4/3π and plot the new

function in the new axes.

TASK THREE (15%)

Your task is to finish the file rotation.m. The input is the coordinate information at the original axes x, y, and the angle to be rotate θ . The output is the coordinate information at the new axes x’ and y’ . Hint: you can use matrix product to map the coordinate of every point. You are expected to see that.






热门主题

课程名

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
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图