Write the matlab code to create the vector

Assignment Help MATLAB Programming
Reference no: EM13803025

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: EM13803025

Questions Cloud

Create a java program that performs distributed systems task : Can someone create a Java program that performs the following distributed systems tasks? This should be easy for a Java programmer
How i manage conflict productively with family : How I manage conflict productively or unproductively with family, work, or dating relationships. How managing conflict in my life has been effective or ineffective.
Article critique-talking styles : Use the ProQuest database to locate and read the article entitled, "Shared Talking Styles Herald New and Lasting Romance". Then, visit the Language Style Matching website and, using sample written communication between you and another person, foll..
The study on the effectiveness of the hiv and aids : study explores the effectiveness of the HIV and AIDS
Write the matlab code to create the vector : 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)
Reveal about the financial position of the company : What do the liquidity, profitability, and solvency ratios reveal about the financial position of the company?
Design an application in python : Design an application in Python- The application would generate a set of 100 integers in a random manner in the range of 50 to 150 including both the numbers in the range
Identify the strategic objective of the plan : Identify the strategic objective of the plan. Identify what people should be involved in the implementation.
Determine the magnitude of the pin reaction : Determine the magnitude of the pin reaction at B by (a) ingoring the fact that BD is a two-force member and (b) recogniazing the fact that BD is a two-force member.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Beginning with the row number passed

Write a MATLAB function that takes a matrix, a row number and a column number. Beginning with the row number passed to the function, scan down the column passed to the function and return the row number that contains the largest absolute value in ..

  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.

  Approximate the solution to the above initial value problem

1. dydt te3t - 2y 0 le t le 1 y0 0approximate the solution to the above initial value problem usinga modified-euler

  Set up a quadratic optimization problem

Set up a quadratic optimization problem that will determine the best investment mix and solve the problem using the MATLAB quadratic optimization routine quadprog. Interpret your results.

  Create a function file that computes the distance

Write a function that accepts temperature in degree Fahrenheit and computes the corresponding value in degrees Celsius. The weight force must balance the spring forces at this new position.

  Find the mean value and standard deviation of total gravity

plot the total gravity effect of the 5 cylinders by summing their effects at each observation point on the profile.   What is the mean value and standard deviation of the total gravity effect

  Write a matlab function newtonraphson

Write a MATLAB function newtonRaphson(fx, x0, sigfig, maxIT) that will return a root of the function f(x) near x=x0 using the Newton-Raphson method, where sigfig is the accuracy of the solution in terms of significant figures

  Prepare a matlab code for triangulation

Prepare a matlab code for triangulation

  Prepare the matlab script code

Prepare the MatLab Script Code written for - create a row array with m elements consisting of all the integers from 1 to m. Use disp to display the resulting array. For m, use 15.

  Matlab program which will determine your vehicle fuel usage

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this progr..

  Calculate an approximation to the energy consumed

Calculate an approximation to the energy consumed over the period and calculate an approximation to the energy consumed over the period t = a to t = b.

  Compute the eigenvalues and eigenvectors of the matrix

Compute the eigenvalues and eigenvectors of the matrix

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