سؤال كيف نقدر نوجد ال eigenvector ؟
بالاستعانه بالهيلب قدرت اعرف الامر حق الeigenvalue بس ماعرفت الeigenvector
سؤال ثاني :
في سؤال 6 من اكسرسايز 2
ايش يقصد بالامر A\B وكيف استخدم هذا الامر لحل النظام
الجزء الثاني من السؤال انو اسوي تشيك على الحل اسوي انو X=inv(A)*B
كذا تمام ؟؟
produces matrices of eigenvalues (D) and eigenvectors (V)
of matrix A, so that AV = VD. Matrix D is the canonical form of
A — a diagonal matrix with A’s eigenvalues on the main diagonal.
Matrix V is the modal matrix — its columns are the eigenvectors of A.
بما ان AX = B
اذن
بالقسمة A\B تساوى مصفوفة X
والقسمة هنا تعنى ان B فى البسط و A فى المقام
%1(a)
fprintf('Pleace enter the current stock price
')
s=input('s=')
fprintf('Pleace enter the exercise price at time
')
k=input('k=')
fprintf('Pleace enter the time until option can be exercised
')
t=input('t=')
fprintf('Pleace enter the risk free rate of interest
')
r=input('r=')
fprintf('Pleace enter the stock volatiiity
')
v=input('v=')
fprintf('Pleace enter the yelid
')
y=input('y=')
d1=log10(s/k)+(r+(v^2)/2)*t
d2=d1-v*sqrt(t)
c=s*y*d1-k*exp(-r*t)*y*d2
[call,put]=blsprice(s,k,t,r,v,y)
بالنسبه لفقره b كيف حتكون الرسمه وكيف نستخدم for loop وايش اللي حيكون المحور x-axis وايش اللي اعتبره ال y-axis
Write a user defined function that takes S, K, T, r, σ as inputs and returns the Black-Scholes Call
price of an option.
لا يوجد فى الكود الذى ارفقتيه اى دالة على الاطلاق
ألقى نظرة على الدالة الاتية فى الماتلاب
>> help function
FUNCTION Add new function.
New functions may be added to MATLAB’s vocabulary if they
are expressed in terms of other existing functions. The
commands and functions that comprise the new function must
be put in a file whose name defines the name of the new
function, with a filename extension of ‘.m’. At the top of
the file must be a line that contains the syntax definition
for the new function. For example, the existence of a file
on disk called STAT.M with:
طيب يااستاذ أحمد هل في البدايه اعرف syms لكل المتغيرات
بعدين اكتب syntax بس عندي سؤال لما اكتب function وجوتها الاوت بت في السؤال اللي فهمته انو يبغى الاوت بالمعادلات الثالثه
وعندنا الinput خمسه عادي ذا الشئ وكذا تفكيري تمام