Write a function with header

Assignment Help Simulation in MATLAB
Reference no: EM13926306

1. Write a function with header [M]= myMax(A) where M is the maximum (largest) value in A. Do not use the built-in MATLAB function max.

2. Write a function with header [M] = myNMax(A,N) where M is an array consisting of the N largest elements of A. You may use MATLAB's max function. You may also assume that N is less than the length of M, that A is a one-dimensional array with no duplicate entries, and that N is a strictly positive integer smaller than the length of A.

3. Let Mbe a matrix of positive integers. Write a function with header [Q] = myTrigOddEven(M) , where Q(i, j) = sin (M(i, j)) if M(i, j) is even, and Q(i, j) = cos (M(i, j)) if M(i, j) is odd.

4. Let P be an m × p matrix and Q be a p × n matrix. As you will find later in this book, M = P × Q is defined as M(i, j) = kp=1 P(i, k) · Q(k, j). Write a function with header [M] = myMatMult(P,Q) that uses for-loops to compute M, the matrix product of P and Q.

5. The interest, i, on a principle, P0, is a payment for allowing the bank to use your money. Compound interest is accumulated according to the formula Pn= (1 + i) Pn-1 , where n is the compounding period, usually in months or years. Write a function with header [years] = mySavingPlan(P0, i, goal) where years is the number of years it will take P0 to become goal at i% interest compounded annually.

Reference no: EM13926306

Questions Cloud

What is most significant about these models : Thomas Jefferson proposed a republic view for education, and Horace Mann suggested the common school movement. These are two of the many foundational models used in American education. What is most significant about these models? Do these models ..
Auerbach enterprises manufactures air conditioners : Auerbach Enterprises manufactures air conditioners for automobiles and trucks manufactured throughout North America. The company has two main products MaxiFlow and Alaska. MaxiFlow uses a few complex fabricated parts that have been found easy to a..
Solve for the optimal values of the decision variables : A chocolate maker has contracted to operate a small candy counter in a fashionable store. Formulate the LP model. Solve for the optimal values of the decision variables and the maximum profit.
Comparison of the forecasting techniques : Compare the mean absolute error, root mean square error, and the mean absolute percent of error for all four of these forecasting techniques - what do these statistics tell you about the forecasts?  Which one is the best forecast and why?
Write a function with header : Write a function with header [M]= myMax(A) where M is the maximum (largest) value in A. Do not use the built-in MATLAB function max
Chester & wayne a regional food distribution : Chester & Wayne is a regional food distribution company. Mr. Chester, CEO, has asked for my assistance in preparing cash-flow information for the last three months oft his year. Selected accounts for an interim balance sheet dated September 30, ha..
Explain in detail resource allocation : Any required organizational change management strategies that would enhance successful implementation
The information on mental health disorders and issues : In considering the information on mental health disorders and issues in children and adolescents, comment on at least 3 things that you have learned about mental health issues. In addition, comment on what you will be more aware of with children and ..
Problem regarding the organizational assessment : As the human resources (HR) manager for a public organization, you are conducting a New Hire Orientation session for all new employees. As research for your orientation, you are writing a report about the functions of the organization, its strengt..

Reviews

Write a Review

Simulation in MATLAB Questions & Answers

  Simulate 16-qam system without grey coding

Simulate and compare the BER of a 16-PSK system and a 16-QAM system without Grey coding and Eb/N0=0,2,4,6,8,10 dB. "

  Effect on the ber of changing the way

Using M-PSK and QAM modulations with M>2, investigate the effect on the BER of changing the way in which the various bit combinations are mapped to the constellation points. Both binary and Gray mapping are available in the modulation dialogue box..

  Voice transmission between bluetooth devices

Need someone to simulate a Bluetooth module in matlab showing that voice transmission between Bluetooth devices

  Write the specification of load mover

Write the specification of LOAD MOVER detailed of the whole design and precise for automatic control section and divide the design into various modules and Is the kernel required if yes which one?

  Assignment- optimal stopping rule for a gambler

Assignment- Optimal Stopping Rule for a Gambler (or City Trader), Objective - To practice MATLAB and basic Simulation Techniques. Problem - A gambler makes a series of plays with outcomes X1, X2,.... where the Xi, i ≥ 1 are independent, identically d..

  Produce a simulation of the mechanism motion

Write a code to produce a simulation of the mechanism motion using the equation written in red in the file.

  Calculate the stress intensity factor

Use the three-parameter zone finite element method or the boundary collocation method to calculate the stress intensity factor K, at the crack tip for the plate

  Use matlab to plot the periodic square wave

Use MATLAB to plot the periodic square wave 5 f(t) over the time interval 0 ≤ t ≤ 3T  . On the same graph, plot the output waveforms, f0(t), of the two amplifiers with corner frequencies of F =  10I and F = 40I, respectively.

  Solve the linear system

Compute the rank of S manually and use the MATLAB function to verify the result - Solve the linear system of equations Ax = b using MATLAB.

  What is probability that account will have insufficient fund

What is the probability that the account will have insufficient funds to pay claims at some point during the year - what should this amount be if the company wants there to only be a 5% chance of having insufficient funds?

  The hodgkin-huxley model for the action potential

MATLAB Project - The Hodgkin-Huxley model for the action potential, Develop a cellular model for a neuron based on the Hodgkin-Huxley equations for the action potential

  Simulate the standardised sum of independent

Simulate the standardised sum of independent and identically distributed variates - Fit a linear regression model as in Q5, and plot your estimates for β0 and β1 as N increases, together with a line indicating their true values. Supply your code.

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