cannot solve for unknown variable; stuck in setting search range in the command vpasolve
Show older comments
Referring to this answer, Walter helped me solving the problem. In that answer, there was a search range specified (vpasolve(sigma, [0 .5e-4])).
Now, my question is, how can I define the search range? I tried to manipulate that range but failed to get the required range. I want to know how can I set that range for any problem.
I am adding one code for reference.
clc; clear; close all;
%Constants and variable
L= 300e-6;
O= 5e-6;
T_init= [25 198.6111 372.2222 545.8333 719.4444 893.0556];
D_T = 0:25:500;
T_set= D_T+T_init(1);
theta= atan(2*O/L);
alpha= 3.2e-6;
E= 180e9;
w= 1.83e-6;
h= 2.5e-6;
I= (h*w^3)/12;
L_p_0 = (L/2)*(tan(theta))^2;
y_0= (L/2)*tan(theta);
%Calculation
for ii=1:length(T_init)
syms F1 real
k1= sqrt(F1/(E*I));
G= tan((k1*L)/4);
L_p = ((tan(theta))^2/(4*k1))*( 2*G + k1*L + k1*L*G^2 + sin(k1*L) - 2*G*cos(k1*L) - G^2*sin(k1*L));
delta_L_p = L_p - L_p_0;
stress(:,ii) = E*alpha*(T_set-T_init(ii));
sigma(:,ii)= (E/L)*(delta_L_p + ((F1*L)/(E*w*h)))== stress(:,ii);
F(:,ii)= vpasolve(sigma, [0 .4e-4]);
k(:,ii)= sqrt(F(:,ii)./(E*I));
y_a(:,ii)= 2.*(tan(theta)./k(:,ii)).*tan((k(:,ii).*L)./4);
delta_y(:,ii)= (double(y_a(:,ii)) - y_0)*1e6
end
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox 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!