Implementing vectorial equation with matrix as variable
显示 更早的评论

I have the following equation I want to implement for an exercise.
Am facing the following problems that I have not been able to overcome:
- The equation contains two equal signs which MatLab does not accept.
- when taking away one of the equal signs ML says there are too many output. Also, putting a semicolon between a(i) and b(i) causes errors.
a = zeros(1, 5);
b = zeros(1, 5);
c = 3.1415;
D = [0 1; -3.5 -0.921];
a0 = 45;
b0 = 31;
i = 2; %would later be variable
[a(i), b(i)] = [a0; b0]*c^(D*i)
Dividing the vector causes ML to say that the left and the right side have a different number of elements:
a(i) = a0*c^(D*i)
Perhaps it simply isn't possible. If that is the case, confirming that would be appreciated.
Any help or tips in regards to implementing this equation would also be greatly appreciated.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!