Help with non working for loop for generating a matrix

1 回表示 (過去 30 日間)
Jeff
Jeff 2020 年 3 月 30 日
編集済み: Jeff 2020 年 7 月 4 日
  1 件のコメント
James Tursa
James Tursa 2020 年 3 月 31 日
編集済み: James Tursa 2020 年 3 月 31 日
c is a vector, so what is x(c) supposed to mean?
Can you just post the equations you are trying to code and we can help you code them?

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

採用された回答

Matt J
Matt J 2020 年 3 月 31 日
編集済み: Matt J 2020 年 3 月 31 日
One approach is to write x,y, and A as matrix-valued anonymous functions of c, e.g.,
x=@(c)(4-c)./(6+c);
y=@(c)10./(6+c);
A = @(c) [-1-2.*x(c)+y(c) x(c);-6.*y(c) 4-2.*c.*y(c)-6.*x(c)];
fplot(@(c) trace(A(c)), [0,2.23])
xlabel 'c'
ylabel 'Trace(A(c))'

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by