How to retrieve an unknown value from a matrix

15 ビュー (過去 30 日間)
Scott Sanders
Scott Sanders 2018 年 10 月 31 日
コメント済み: Scott Sanders 2018 年 10 月 31 日
Point of this task is to retrieve a value of "w" from the matrix "A", where we know that the determinant of this matrix is equal to zero. There will be more than one value of "w" but how do I make the "w" value my output in such a way?
m=9000000;
Ig=1350000000;
D=2.5;
t=0.02;
I=pi()*(D^4-(D-2*t)^4)/64;
l1=16;
l2=14;
l3=17;
l4=13;
k=1000000;
A=[((4*k)-((w^2)*m)) 0 (2*k*(l2-l1)); ...
0 ((4*k)-((w^2)*m)) (2*k*(l4-l3)); ...
(2*k*(l2-l1)) (2*k*(l4-l3)) ((2*k*(l1^2+l2^2-l3^2-l4^2)-(w^2*Ig)))];
det(A)=0;
  2 件のコメント
the cyclist
the cyclist 2018 年 10 月 31 日
Do you mean that you want to solve for the value of w that will make the determinant of A equal to zero?
Scott Sanders
Scott Sanders 2018 年 10 月 31 日
yes

サインインしてコメントする。

回答 (2 件)

YT
YT 2018 年 10 月 31 日
編集済み: YT 2018 年 10 月 31 日
Instead of
det(A) = 0; %which should've created an error for you
You could use solve like this to find w
syms w
... %your other lines
solve(det(A) == 0,w)
More info on solve can be found here
  1 件のコメント
Scott Sanders
Scott Sanders 2018 年 10 月 31 日
When I run this it does not produce any values for w. Just outputs w as a symbol.

サインインしてコメントする。


the cyclist
the cyclist 2018 年 10 月 31 日
Assuming you want to solve for w, as I mentioned in my comment, then this will do it:
m=9000000;
Ig=1350000000;
D=2.5;
t=0.02;
I=pi()*(D^4-(D-2*t)^4)/64;
l1=16;
l2=14;
l3=17;
l4=13;
k=1000000;
detA = @(w) det([((4*k)-((w.^2)*m)) 0 (2*k*(l2-l1));
0 ((4*k)-((w.^2)*m)) (2*k*(l4-l3));
(2*k*(l2-l1)) (2*k*(l4-l3)) ((2*k*(l1^2+l2^2-l3^2-l4^2)-(w.^2*Ig)))]);
w_critical = fzero(detA,0.6);
figure
hold on
for w = 0.66:0.001:0.7
h = plot(w,detA(w),'o');
set(h,'Color','k')
end
A couple things to note:
First, I defined detA as a function of w.
Second, I had to choose a very good initial guess for w_critical, because your function varies over a huge range, so fzero will fail if you are not close. I found a good value by plotting your function, and zooming in on one part near zero. Here is the final plot I used:
  1 件のコメント
Scott Sanders
Scott Sanders 2018 年 10 月 31 日
This isn't quite what I was looking for but think it is because I have not established the problem enough yet so will refine my input before requesting any further help. Thank you for your help

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by