Solving Matrix C F = Fsz for two cases with two different C matrices?

2 次查看(过去 30 天)
Hey,
I have linked my code below. Basically I am trying to solve for a matrix F from C F = Fsz where c is a 2*2 and Fsz is a 2*6217, which i then inverse by using F = F' to obtain a 6217*2 vector. As can be seen in the picture below and the linked code, Fsz is dependent on UWED and LWBC which are time-dependent variables. As of now my code solves this, and I find a 6217 * 2 matrix F as needed. However, as you can see attempted in my code, I am trying to have a different constant C depending on the condition Fbrake >= 10 or not. Ideally, I would like for the program to solve the matrix for each time (0, 0.01,0.02, 0.03, ect....), depending on the value of Fbrake, and return them all into the matrix F. Am I on the right track?
Thanks a lot
Fz = 10 .* PRMN
cz = [0.156 0.512]
Fs = 10 .* [UWED LWBC] %Matrix representing three suspension member forces (ie: [Ftr Fpr Fuwed])
z = cz .* Fz
Fsz = Fs - z
Fsz = Fsz'
if Fbrake >= 10
c = [1.295 0.567; 2.686 0.557] % coefficients of forces for the three tire forces obtained from matlab model simulation
else
c = [2 0.567; 3 0.557]
end
F = c\Fsz;
F = F'
Fx = F(:,1);
Fy = F(:,2);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by