Matlab program to add all the elements of a matrix

Assignment Help MATLAB Programming
Reference no: EM13698095

Problem one: Enter a vector, named vector1, which has at least 6 elements, using the input statement.

Create a new vector, named vector2, containing only the elements in the even numbered positions from vector1. For example, if vector1 is [0 1 2 3 4 5 6], vector2 should be [1 3 5].

Problem two: Write a MATLAB program (script) to add all the elements of a matrix.

Do not use the MATLAB sum() function. Prepare the program general so that it will work with any size matrix.

These are two different problems that I am confused on. Please help, thanks!!!

Reference no: EM13698095

Questions Cloud

What determines the keys used in arrays : What determines the keys used in arrays such as $_GET and $_POST?
Implement class that can be player in a game of tic tac toe : Specify, design, and implement a class that can be one player in a game of tic-toc-toe. The constructor should be specify whether the object is to be the first player (X's) or the second player (O's).
Make an explicit statement of the invariant of the set class : Prepare a new container class called ser, which is similar to a bag, except that a set can contain only one copy of any given item, you'll need to change the interface a bit.
Describe the two-wire and four-wire circuits : What is a circuit?  Describe the two-wire and four-wire circuits.  What device boosts a weak signal (analog/digital) and What is a channel?
Matlab program to add all the elements of a matrix : Create a new vector, named vector2, containing only the elements in the even numbered positions from vector1. For example, if vector1 is [0 1 2 3 4 5 6], vector2 should be [1 3 5].
Create a function that subtracts two vectors : Create a function in C++ that subtracts two vectors - prepare a program to subtract two vectors and provide all the code.
Write a code that finds the average of all the elements : An array of double-precision (64-bit) floating-point numbers is located in the memory starting at address 1000. It contains 40 elements.
Find method searches the haystack array : Write a class, ArraySearch that has two methods - The find method searches the haystack array to see if the elements within are the same, which is determined by the equals method, as the needle.
Define predicate combinations : Define predicate combinations which find the number of combinations K of up to N numbers. Validate your predicate with the subsequent test:

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Write a function called crazygrade

Write a function called CrazyGrade that will take in the string and flip the grades according to the specifications - Define the inputs and outputs to each problem

  Compare with the true value

compare with the true value of 6.737947 x 10 -3  . Use 20 terms to evaluate each series and compute true and approximate relative errors as terms are added.

  Write a user defined function

Write a user defined function FindFrequency which inputs are a time and a wave elevation vector and output the approximated wave frequency (fappr=FindFrequency(t,eta)).

  Create a script file for conversion of temperature

Create a script file for conversion of temperatures. Use the input function or menu function to allow the user to enter temperature scale of Fahrenheit, Celsius, Kelvin, or Rankine. If you are using the input function, tell the user to enter F for Fa..

  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

  Estimation of the rayleigh limit

Propose a method that would allow estimation of the Rayleigh limit experimentally - Rayleigh frequency resolution limit

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  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).

  Blood declines due to metabolic processes

Find an expression for the half-life in terms of k, and obtain a plot of the half-life versus k for the indicated range.

  Derive and solve a model of an insulated water tank

Determine the steady state conditions at t

  Consider the predator-prey models

Consider the predator-prey models developed early part of the 20 th  century in which the number of predators and preys may be predicted using the pair of ODEs

  Define the transformation matrix

Define the transformation matrix for each vertex that keeps the approach of the knife normal to the circumference and oriented toward the cut, and makes the cut 1 cm deep.

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