Write the matlab code to create a 1x3 vector

Assignment Help MATLAB Programming
Reference no: EM13772470

1) The primary form of data in MATLAB is vectors. They can be one-dimensional (i.e., vectors), or two-dimensional (i.e., matrices).

a) Write the MATLAB code to create a 1x3 vector containing the elements [1,2,3]. Additionally, write the MATLAB code to create a 3x1 vector with the same elements.

b) Write the MATLAB code to create the vector [2,4,6,...,98,100] and store it in a variable named x(Hint: There is a shorthand notation for regularly spaced vectors).

c) Write the MATLAB code to create a 2x2 matrix containing the elements [1,2,3,4] (The order of the numbers do not matter).

2) MATLAB has several types of built-in math functions that can help you perform common operations.

a) Write the MATLAB code that takes the absolute value of -134.

b) Write the MATLAB code that stores a number 3*pi in a variable named x, then takes the cosine of x.

c) Functions can also be applied to vectors. Assume you have a vector y, which contains the elements [4,9,16]. Write the MATLAB code to take the square root of y. What should the result be?

Reference no: EM13772470

Questions Cloud

Discuss the structure of the us intelligence community : Discuss the structure of the U.S intelligence community. Is it effective? If not, what changes should be made
Which view do you employ most often : Which view do you employ most often? Identify a type of writing for which each view would be particularly appropriate.
Calculate your aunts expected profits based on information : Your aunt is thinking about opening a hardware store. She estimates that it would cost $500,000 per year to rent the location and buy the stock. In addition, she would have to quit her $50,000 per year job as an accountant. Calculate your aunt's expe..
How can the united states balance civil liberties : How can the United States balance civil liberties and security in intelligence activities
Write the matlab code to create a 1x3 vector : Write the MATLAB code to create a 1x3 vector containing the elements [1,2,3]. Additionally, write the MATLAB code to create a 3x1 vector with the same elements.
Why is community policing in minority and ethnic : Why is community policing in minority, ethnic, and immigrant communities especially crucial to the success of law enforcement in any given city or rural community
Describe a collaborative experience you have had : Describe a collaborative experience you have had; you may describe a writing project, but feel free to introduce some other collaborative endeavor.
Conduct internet searches on different crimes : Conduct Internet searches on different crimes that could be considered cyber crimes or that could be committed using computers as the primary method
Why some volunteer willingly use their spare time on project : Explain the reasons why some volunteers willingly use their spare time on projects that do not directly benefit them and even ones that may put them at risk.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Solve the differential equation

Find a general solution of the following differential equation and solve the differential equation

  Develop a simulation program

Develop a simulation program

  Calculate and return the area of a rectangle

Write a function calcrectarea that will calculate and return the area of a rectangle. Pass the length and width to the function as input arguments.

  Estimate the numerical wave speed

Scheme and try a couple of values for α, one close to 1 and the other not. Convince yourself that a smaller Δt is not necessarily a better choice.

  Create a function that will determine the total resistance

Create a function that will determine the total resistance of a number of resistors that are connected in parallel. This function should accept a row vector for input,

  Calculate the geometric mean of numbers

Write a program to calculate the geometric mean of numbers entered by a user. The program should prompt the user to enter numbers and continue to accept the numbers until the user enters 999.

  Script that will graphically show the range of frequency

the script that will graphically show the range of frequencies for which the ouput amplitude is less than 70% of the input amplitude. The original problem statement

  Write matlab scripts

Write MATLAB scripts for to accept two numbers from the user; Display all prime numbers between these two numbers.

  Give the gradient operator in paraboloidal coordinates

Given that the le data.txt contains only real numbers seperated by white space, write down a sequence of maple commands that will read the data into a maple list and then plot a histogram of the elements in the list.

  Design a normalized lowpass analog filter

Design a normalized lowpass analog filter by using one of Matlab's routines: buttap, cheb1ap, cheb2ap, ellipap to get your analog poles

  The gauss-newton method

Write up your results using our standard format. Show and discuss the results of Steps 1-3 in some detail, including the observed convergence rates of steepest descent versus the Gauss-Newton method

  Pattern recognition

Research and discover more in-depth knowledge about topics in Pattern Recognition and choose a topic. The best topic will be the one you are most interested in or a topic from your research project you are working on.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd