solving equations in multiple variables with Transfer Matrix Method

1 回表示 (過去 30 日間)
ZhiH
ZhiH 2014 年 5 月 13 日
編集済み: ZhiH 2014 年 5 月 13 日
Hello there!
I do have a problem with this calculation.
The original code looks like this:
clear all
format long
N = 6;
% syms A B
A = [];
B = [];
for kk=1:N
A = [A sym(['A' num2str(kk)])];
B = [B sym(['B' num2str(kk)])];
end
M = [1,2;3,4];
A(N) = 0;
B(1) = 0;
for ii = 1:N-1
fab = M*[A(ii+1);B(ii+1)];
fa(ii) = A(ii)-fab(1,1);
fb(ii) = B(ii)-fab(2,1);
end
s=solve(fa,fb);
but these B matrices cannot be calculated. I hope someone can give me a good advise, how to deal with that. Thank you!

回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by