Question
Matlab help thank you
-Consider a person s yearly salary is 30k usd System 1: get 5% of your salary and put in a bank with 4% interest System 2:get 5% of your salary and match it with the same amount (another 5% from your employer) Calculate and plot over 30 years the amount of money you will get if you get 0% interest on system 2 ) for system 2 to become better than -Do another plot with different amount of interest (1%,2%, system 1 after 25 years
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Plot 2:

Figure 1 File Edit View Insert Tools Desktop Window Help 140 120 100 보 80 d 60 40 20 20 25 30 15 Years 10

Raw copyable code:

clc

%to compute the system 1 values
x=[]
x(1)=30*0.05
for i=2:30
    x(i)=x(i-1)+(x(i-1)*0.04)+(30*0.05)
end

%to compute the system 2 values
y=[]
y(1)=(30*0.05)
for i=2:30
    y(i)=y(i-1)+(30*0.05)+(30*0.05)
end

%to plot the amount of money versus years
years=1:30

%create the plot of system 2
figure
plot(years,y,'color','b');

xlabel('Years')
ylabel('Money get in k usd')

%make plot with different value of interest
%for 1% interest
y1=[]
y1(1)=(30*0.05)
for i=2:30
    y1(i)=y1(i-1)+(30*0.05)+(30*0.05)+y1(i-1)*0.01
end

%for 2% interest
y2=[]
y2(1)=(30*0.05)
for i=2:30
    y2(i)=y2(i-1)+(30*0.05)+(30*0.05)+y2(i-1)*0.02
end

%for 3% interest
y3=[]
y3(1)=(30*0.05)
for i=2:30
    y3(i)=y3(i-1)+(30*0.05)+(30*0.05)+y3(i-1)*0.03
end

figure
%create the plot of two systems
plot(years,x,'color','r');
hold on;
plot(years,y1,'color','b');
hold on;
plot(years,y2,'color','g');
hold on;
plot(years,y3,'color','y');

Add a comment
Know the answer?
Add Answer to:
Matlab help thank you -Consider a person s yearly salary is 30k usd System 1: get...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Your employer provides a 401(k) plan with a matching contribution of 7% of your salary if you put...

    Your employer provides a 401(k) plan with a matching contribution of 7% of your salary if you put in at least 5% of your salary. If your monthly salary is $2250 and you contribute just enough to get the match, then how much money will be added to your account in total over one year? Your Answer: Your employer provides a 401(k) plan with a matching contribution of 7% of your salary if you put in at least 5% of...

  • 5. Ali, Bob and Connie each have 3 000 USD (US dollar) to invest. Ali invests...

    5. Ali, Bob and Connie each have 3 000 USD (US dollar) to invest. Ali invests his 3000 USD in a firm that offers simple interest at 4.5% per annum. The interest is added at the end of each year. Bob invests his 3 000 USD in a bank that offers interest compounded annually at a rate of 4% per annum. The interest is added at the end of each year. Connie invests her 3 000 USD in another bank...

  • please do part D only the matlab. thank you 3. Consider the following system s(s2 +4s...

    please do part D only the matlab. thank you 3. Consider the following system s(s2 +4s 13) (a) Draw the root locus. b) Use Routh's criterion to find the range of the gain K for which the closed-loop system is stable. (continued on next page) (c) The range of K for which the system is stable can also be obtained by finding a point of the root locus that crosses the Imaginary axis. When you have an Im-axis crossing, the...

  • please show work thank you! Use Matlab to and the SISOTool construct the system for analysis...

    please show work thank you! Use Matlab to and the SISOTool construct the system for analysis (You may want to preview the tf and sisotool commands from matlab by typing help tf or doc tf etc...) Each Block B1, B2, B3 and B4 will be constructed individually and then concatenated together As shown in the block diagram let K=0.1 Set B1 = 0.1 by typing in matlab >>B1=0.1 To assign the Blockl values use the TF command to construct a...

  • This question uses matlab R2018a Retirement.m is -> function [MyCont, CompCont, Total] = retirement(salary) if salary...

    This question uses matlab R2018a Retirement.m is -> function [MyCont, CompCont, Total] = retirement(salary) if salary <= 30000 MyCont = 0.1 * salary; CompCont = 0.1* salary; elseif salary <= 60000 MyCont = 0.1*salary; CompCont = 0.1 * 30000 + 0.05 * (salary - 30000); elseif salary <= 100000 MyCont = 0.1*60000 + 0.08 * (salary-60000); CompCont = 0.1*30000 + 0.05*30000; else MyCont = 0.1*60000 + 0.08 * 40000; CompCont = 0; end Total = MyCont + CompCont;      ...

  • When you start your first job after graduating from Ohio State on January 1st, 2023, you...

    When you start your first job after graduating from Ohio State on January 1st, 2023, you saved a portion of your salary in your company's 401k savings plan. Your salary is $60,000 annually, of which you put 10% in the savings plan at the end of each year. (In reality, a portion is saved from each paycheck, but we will use annual deposits for simplicity.) Assume the savings plan earns 4% interest annually. Now it is four years later, January...

  • Matching Questions 1. A traditional pension plan in which you receive a promised payout at retire...

    Matching Questions 1. A traditional pension plan in which you receive a promised payout at retirement. 2. A retirement plan in which the employer provides all of the funding and employees do NOT put their own money into the plan.    3. A type of retirement plan where both the employee and employer can/do put money into the plan. 4. A retirement plan provision that allows you to take your account balance with you if you leave your current employer and...

  • Can anyone please help me to solve the problem. Appreciate your help. Thank you. Y(s) Fig. 3 Consider a feedback control system shown in Fig. 3 where: 20000 G(s) - (s2+6s 8) (s 20) a) Sketch the asym...

    Can anyone please help me to solve the problem. Appreciate your help. Thank you. Y(s) Fig. 3 Consider a feedback control system shown in Fig. 3 where: 20000 G(s) - (s2+6s 8) (s 20) a) Sketch the asymptotic Bode plot. b) Plot the Bode plot by use of MATLAB Y(s) Fig. 3 Consider a feedback control system shown in Fig. 3 where: 20000 G(s) - (s2+6s 8) (s 20) a) Sketch the asymptotic Bode plot. b) Plot the Bode plot...

  • Question 1: a) Use MATLAB, plot the step repose for the following transfer functions. 48 G(s)-...

    Question 1: a) Use MATLAB, plot the step repose for the following transfer functions. 48 G(s)- (8+6)(s+8) G(s)- 52 +2s + 18 18 Question 2: a) Using MATLAB, plot Bode log-magnitude and phase plot of (s+2)(8+5) G(S) - (s +3) ($2+2s +20) Question 3: Using MATLAB Sketch the root locus of the unity feedback system shown in the figure below: a) Give the values for all critical points of interest. b) Id the system ever unstable? If so, for what...

  • Signals and System: MATLAB code provided? Begin with the MATLAB script named lab4.m as follows. You...

    Signals and System: MATLAB code provided? Begin with the MATLAB script named lab4.m as follows. You will modify this example code to cover each of the parts of this lab. You must always carefully document and include appropriate comments in any MATLAB code. & starting point for Lab#4 % LAPLACE TRANSFORM %---------- clear all; close all; -------------------- s = tf('s'); sys = 1/(5+1); & define H(s) for a dynamic system named sys ---------------- figure(1); bode (sys); % plot magnitude and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT