Help with non working for loop for generating a matrix

1 次查看(过去 30 天)
  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 CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by