フィルターのクリア

how can i plot the values of 2 variables against eachother from the determinant of a martix when det ==0?

2 ビュー (過去 30 日間)
I am trying to plot the answers for variables o and e from my code when the det of my matrix ==0. when i use solve i get struct results back that i cannot seem to plot.
syms e o n
c=0;
g(n)=e/(2*(o+(1i*n*c)-((n)^2)));
f=[1 g(3) 0 0 0 0 0; g(2) 1 g(2) 0 0 0 0; 0 g(1) 1 g(1) 0 0 0; 0 0 g(0) 1 g(0) 0 0; 0 0 0 g(-1) 1 g(-1) 0; 0 0 0 0 g(-2) 1 g(-2); 0 0 0 0 0 g(-3) 1];
F=det(f)==0;
solo=solve(F, o, 'ReturnConditions', true);
sole=solve(F, e, 'ReturnConditions', true);

採用された回答

John D'Errico
John D'Errico 2020 年 6 月 16 日
編集済み: John D'Errico 2020 年 6 月 16 日
First, need I point out just how bad of an idea is it to name a variable a lower case o? This is just asking to produce buggy code, when you misread or mistype o as 0.
Regardless, Just set
F = det(F);
If you look at F, you will see it is essentially a high degree (greater than 4 is all that matters) polynomial. So algebraic solutions will often be difficult to find.
Then use fimplicit to plot the solution locus. Settign it to zero does not help. In fact that will cause problems, and fimplicit does that implicitly anyway.
fimplicit(F)
xlabel 'e'
ylabel 'o'
The solo and sole calls to solve do nothing useful, since no algebraic solutions will generally be found.
  1 件のコメント
Seb apple
Seb apple 2020 年 6 月 16 日
brilliant thank you. I'm not highly experienced in matlab so this i a great help

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

その他の回答 (0 件)

カテゴリ

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