Well you have a lot going on.
Do you understand the fundamentals of going back and forth between Transfer function and differential equation by hand first? In order to fully understand how to do this in matlab you need to first understand how to do it by hand.
At the end of your post you say
"(Namely, i want to find F(s)/x(s) )"
Im assuming you mean you want F(t)/X(t) because with your equation you already have F(S)/X(s)
In general F(S) is your output and X(s) is your input in 90% of books. I do know that in some books the classical mass spring dampener system is backwards. For some reason Mech people are always upside down from EE :)
Anways!!
This procedure is pretty simple Please don't forget to accept the answer so i get the credit Thanks!
clear all
close all
clc
syms k c m s
My_trasnfer_function = 1/(m*s^2+c*s+k)
pretty(My_trasnfer_function)
My_generic_trasnfer_function = ilaplace(My_trasnfer_function)
K = [.5 2 4 6]
M = [.1 .2 .5 .9]
C = [1 2 3 4]
for p = 1:4
My_transfer_function = subs(My_trasnfer_function,k,K(p))
My_transfer_function = subs(My_transfer_function,m,M(p))
My_transfer_function = subs(My_transfer_function,c,C(p))
pretty(My_transfer_function)
My_diff_eq = ilaplace(My_transfer_function);
pretty(My_diff_eq)
end
Best Answer