联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-23:00
  • 微信:codinghelp2

您当前位置:首页 >> Matlab编程Matlab编程

日期:2021-04-07 10:54

Introduction to Matlab

Assignment 1

1. Create the vector x = [1,2,...,100]. Assign the even numbers of x to a

new vector y.

2. Use for loop to find the values of for t = 0, 01,

0.2, 0.3, 0.4 s when f =10, 15, and 20 Hz. Use one set of statements to

compute the values for all three frequencies and store the results in a two-dimensional

array. Use two nested for loops and double indexing.

3. Use while loop to find the largest value of positive t for which and

are both less than 10. Make the computation for ω=35, 40, and 45. Find your

answers to the nearest 0.01.

4. Create a 15-element vector with values of

at equally spaced interval . Find the maximum element value, the minimum

element value, the average of the element values, and the indices of the elements for

which the element magnitude is greater than 4.

5. Assume , and , where

and . Plot , and v/s with

on the same graph (you have to use hold on command). Label the axes and create

legends for each graph.

6. Sinc function is a function that arises frequently in our course. It is defined as

Create a Matlab function MySinc () that defines sinc(x) function following

the above definition. Plot the value sinc(x) in the interval [-2π 2π] using

MySinc () function and Matlab inbuilt sinc() function on the same graph.


相关文章

【上一篇】:到头了
【下一篇】:没有了

版权所有:留学生编程辅导网 2020 All Rights Reserved 联系方式:QQ:99515681 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。