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

  The matlab language has the built-in ability

The MATLAB language has the built-in ability to perform mathematical operations on complex numbers. However there are times when it is useful to treat complex numbers as structures.

  Determine the level of absolute approximate relative error

2006ENG Numerical and Data Analysis. Convert the equation into f(T) = 0 when cp of 1.1kJ/kgK. In our MATLAB program, develop a plot of f(T) versus a range of T = 0 to 1200 K. MATLAB. On the axes, put proper labelling.

  Error between the exact solution and explicit solution

Calculate the error between the exact solution and explicit solution and draw the exact solution and compare the results.

  Perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  One-dimensional steady-state heat flow

A one-dimensional steady-state heat flow, the mathematical formulation of problem - find out the temperature differences at each locations and calculate the temperatures at each locations

  Write a matlab function that takes in one argument

Write a MatLab function that takes in one argument, a vector or 2-D matrix and returns a single value, the highest value in the vector or matrix. Use nested for loops to accomplish this task. Assume that all of the values in the vector or matrix are ..

  When a fast-breeder reactor is shut down quickly the

when a fast-breeder reactor is shut down quickly the temperature of the surface of a number of components drops from

  Design a three band stop filters

Design a three band stop filters for echo/reverberation cancellation for a specific room. Provide measurements of the room impulse response and frequency response with the coefficients.

  Hi i attached the instructions would you guys do it by 50

i attached the instructions. ltbrgt ltbrgtwould you guys do it by 50 dollars ? ltbrgt ltbrgtit is due this friday

  Write a script that will loop through values

Write a script that will loop through values of n until the difference between the approximation and the actual value is less than 0.0001.

  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.

  Matlab polyfit and polyval functions

Include the original photograph of your selected profile with your assignment. Trace your drawing on a graph paper. For convenience you can rotate the given profile.

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