Plot Rows of Matrix which are a function
1 view (last 30 days)
Show older comments
I was tasked with solving a slider crank mechanism's kinetics analytically and i am unsure of how to plot the solved system of equations as they change over time. To clarify, I wrote out my equations for forces and moments then input the coefficients into a matrix and the summation into a sperate matrix as A = @(t) ... and B = @(t) ... then solved using X = @(t) A(t)\B(t) and now require to plot how each value of x changes over time. Thank you
5 Comments
dpb
on 20 Nov 2019
Edited: dpb
on 20 Nov 2019
Something's wrong in your formulation...the A matrix is singular...
>> arrayfun(@(x)rcond(A(x)),t)
ans =
Columns 1 through 7
0 0 0 0 0 0 0
Columns 8 through 14
0 0 0 0 0 0 0
Columns 15 through 20
0 0 0 0 0 0
>>
If you look at the reformatted construction of A I did above to align elements, the last column is all zeros.
All X values thus end up turning out as either +/-inf or nan...
Answers (0)
See Also
Categories
Find more on Antennas, Microphones, and Sonar Transducers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!