Hello everyone,
I am having trouble getting the same results for the same equation when using Matlab and Maple. Basically as the value for beta changes, Q should change as well hence its integral, hence T. When putting the same equation in Mable I get values for T that are close to 1 but that decrease as beta increases, however the values I get in Matlab are exactly 1 and do not change by changing beta. Is there something wrong with the level of precision in Matlab? Or a problem with the integration?
length_shaft = 0.4% Determining 4 values of beta
f = 'cos(x)*cosh(x)-1'; roots = [fzero(f,4.0) fzero(f,7.0) fzero(f,10.0) fzero(f,14.0)]; beta = roots./length_shaft;% Determining Constant (T) (a value for each beta)
syms yQ = ((cos(beta.*y) + cosh(beta.*y)) - (((cos(beta.*length_shaft) - ... cosh(beta.*length_shaft))./(sin(beta.*length_shaft) - ... sinh(beta.*length_shaft))).*(sin(beta.*y) + sinh(beta.*y)))).^2;B = int(Q,y,0, length_shaft);T = (B.*2.5).^(-0.5);B = double(B)T = double(T)
Best Answer