![1Need to plot the determinant of the matrix for t 0 to 1 - 2019 12 07.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253413/1Need%20to%20plot%20the%20determinant%20of%20the%20matrix%20for%20t%200%20to%201%20-%202019%2012%2007.png)
Need to plot the determinant of the matrix for t 0 to 1?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Shauvik Das
am 7 Dez. 2019
Kommentiert: Star Strider
am 7 Dez. 2019
syms t
PHI=[ 1, -t, -t/3 - (2*exp(-3*(-t)))/9 + 2/9, (2*-t)/3 + (2*exp(-3*(-t)))/9 - 2/9;
0, 1, (5*exp(-3*(-t)))/12 - (3*exp(-t))/4 + 1/3, 2/3 - exp(-t)/4 - (5*exp(-3*(-t)))/12;
0, 0, exp(-3*(-t))/4 + (3*exp(-t))/4, exp(-t)/4 - exp(-3*(-t))/4;
0, 0, (3*exp(-t))/4 - (3*exp(-3*(-t)))/4, (3*exp(-3*(-t)))/4 + exp(-t)/4];
PHIT=transpose (PHI);
B=[0;1;2;1];
BT=transpose (B);
GRAMi = PHI*B*BT*PHIT
GRAMfinal=int(GRAMi,t, 0, t)
A= det(GRAMfinal) %% Absolute determinant of the matrix
N = @(t) (A(t));
t = linspace(0, 1, 50);
for k = 1:numel(t)
Nt(k) = N(t(k));
end
figure
plot(t, Nt)
grid
0 Kommentare
Akzeptierte Antwort
Star Strider
am 7 Dez. 2019
Try this:
PHI = @(t) [ 1, t, t/3-(2*exp(-3*t))/9+2/9, (2*t)/3+(2*exp(-3*t))/9-2/9;
0, 1, (5*exp(-3*t))/12-(3*exp(t))/4+1/3, 2/3-exp(t)/4-(5*exp(-3*t))/12;
0, 0, exp(-3*t)/4+(3*exp(t))/4, exp(t)/4-exp(-3*t)/4;
0, 0, (3*exp(t))/4-(3*exp(-3*t))/4, (3*exp(-3*t))/4+exp(t)/4];
PHIT = @(t) transpose(PHI(t));
B=[0;1;2;1];
BT=transpose(B);
GRAMi = @(t) PHI(t)*B*BT*PHIT(t);
GRAMfinal = @(t) integral(GRAMi, 0, t, 'ArrayValued',1)
A = @(t) det(GRAMfinal(t));
N = @(t) (A(t));
t = linspace(0, 1, 50);
for k = 1:numel(t)
Nt(k) = N(t(k));
end
figure
plot(t, Nt)
grid
xlabel('t')
ylabel('N(t)')
producing:
![1Need to plot the determinant of the matrix for t 0 to 1 - 2019 12 07.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/253413/1Need%20to%20plot%20the%20determinant%20of%20the%20matrix%20for%20t%200%20to%201%20-%202019%2012%2007.png)
5 Kommentare
Star Strider
am 7 Dez. 2019
My pleasure.
If my Answer helped you solve your problem, please Accept it!
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!