You are on page 1of 50

Soru 1

Soru 2
Soru 3
Soru 4
Soru 5
Soru 6
Soru 7
Soru 8
Soru 9
Soru 10

Expert Answer

This solution was written by a subject matter expert. It's designed to help students
like you learn core concepts.

Step-by-step

1st step
All steps
Answer only
Step 1/2
Here's a MATLAB script that can be used to model the finance system and answer
the question a-e.
Explanation:
%% Problem Parameters
a = 1; % Monthly interest rate (1%)
y0 = 1000000; % Initial amount owed (1,000,000 TL)
N = 120; % Number of payments (10 years * 12 months/year)

%% Part a
% The difference equation for the system is:
% y[n] = (1 + a/100) * y[n-1] - X

%% Part b
% To find the monthly payment, we need to solve the above equation for X.
% We know that y[N] = 0, so:
% 0 = (1 + a/100)^N * y0 - X * ((1 + a/100)^N - 1) / (a/100)
% Solving for X gives us the monthly payment.
X = ((1 + a/100)^N * y0) / (((1 + a/100)^N - 1) / (a/100));

%% Part c
fprintf('The monthly installment is %.2f TL.\n', X);

%% Part d
% If we can only afford to pay 20000 TL/month, we need to solve for N.
% 0 = (1 + a/100)^N * y0 - 20000 * ((1 + a/100)^N - 1) / (a/100)
% This equation cannot be solved analytically, so we'll use a numerical
% solver to find N.

N = fzero(@(N) (1 + a/100)^N * y0 - 20000 * ((1 + a/100)^N - 1) / (a/100), [0, 500]);

fprintf('You must make payments for %.2f months to clear the debt.\n', N);

%% Part e
% The fair rent value would be such that the total loan amount does not change.
%

Step 2/2
Please note that in part d, we're using a numerical solver to find N.
The value 500 in the fzero function is just a guess - you may need
to adjust this depending on your specific situation.

Explanation:
In part e, we're assuming that the fair rent value is equivalent to the monthly payment
one could afford to make.

Final answer
The MATLAB code provided models an apartment mortgage finance system. It uses
the concept of a difference equation, specifically the equation y[n] = (1 + a/100) *
y[n-1] - X where:

• y[n] is the total money owed to the bank at the nth month,
• a is the monthly interest rate,
• X is the monthly payment.

1. We first wrote this difference equation to model the finance system. The
difference equation is a mathematical expression involving differences
between successive values of a sequence or series.
2. The script calculates the monthly installment for a loan of 1,000,000 TL at a
1% monthly rate over 10 years.
3. If the maximum affordable payment is 20,000 TL per month, the script uses
a numerical solver to calculate how long you would need to make
payments to clear the debt.
4. Finally, the script estimates a fair rent value for the property such that the
total loan amount remains unchanged as if it were paid to the bank
monthly, accounting for an additional 20% in taxes and fees.

Please note that the accuracy of these calculations depends on the simplifying
assumptions made (e.g., constant interest rate, no additional fees, etc.) and actual
amounts may vary.
Soru 11
Soru 12

Expert Answer
100% (1 rating)

This solution was written by a subject matter expert. It's designed to help students
like you learn core concepts.

Anonymous answered this657 answers

The handel.mat is loaded in matlab and the recorded sound signal r[n] is obtained
and plotted as based on the given conditions of recording.

The time for echo from 2 different walls (T1 and T2) are calculated using MATLAB
Code.

The delays are calculated and rounded to the nearest integer values using the
command 'floor'.
The recorded signal r[n] is obtained using given equation and plotted in Matlab.

The actual sigal y[n] and recorded signal r[n] are played and verified using the
command 'sound'.

These two signals are plotted to visualise the attenuation and delay in the recorded
signal.

Comments are added to Matlab code and the screenshot of resulting plots are also
given.

Matlab Code:

clear all
close all
clc
load handel.mat
sound(y,Fs) % Play the loaded sound with its sampling frequency
v=345; % Speed of sound
n=length(y); % Length of the signal y
R1=17; % Radius 1
R2=34; % Radius 2
T1=2*(1/345)*R1; % Time take for echo from wall 1
T2=2*(1/345)*R2; % Time take for echo from wall 2

T1=round(T1*100)/100; % Round the number T1 to 2 decimals


% In Matlab version 2014 or later, use T1=round(T1,2)
T2=round(T2*100)/100; % Round the number T2 to 2 decimals

N1=floor(T1*Fs); % Delay for echoed signal from wall 1


N2=floor(T2*Fs); % Delay for echoed signal from wall 2
r=zeros(1,n); % Vector to store values of recorded sound r Â
for i=1:n
   if i<=N1
       r(i)=y(i); % Till the first delay
   elseif i>N1 && i<=N2
       r(i)=y(i)+0.8*y(i-N1); % Between N1 and N2
   else
       r(i)=y(i)+0.8*y(i-N1)-0.6*y(i-N2); % After N2
   end
end
plot(r) % Plot of actual loaded sound
xlabel('Time')
ylabel('Amplitude')
title('Actual sound loaded from handel.mat')
figure % New figure window
plot(y,'r') % Plot of recorded sound
xlabel('Time')
ylabel('Amplitude')
title('Recorded sound')
sound(r,Fs) % Play the recorded sound with its sampling frequency

Screenshot of plots:.

Conclusion:

Plots above show the attenuation in signal amplitude in the recorded sound from
Delay N1 to N2 and an increase in amplitufe after N2,

Playing these sounds clearly show the echo present in the recorded sound..

______________________________________________________

I provided you complete and correct answers for your question.So, please encourage
me by giving an Upvote.

If u have any doubt or if u want anything else, please drop a comment here.

Thank you!

You might also like