K_traction = K_m*(1+(f_i*((K_m/(K_m-K_i))-s1)^-1).^-1);%just missing a dot .^-1
Code not graphing properly?
2 次查看(过去 30 天)
显示 更早的评论
I am trying to plot f_i for values of 0 to 1 (x-axis) and K_traction (y-axis).
It is not graphing properly. I graphed in Excel and MATLAB is producing the right graph.
I think I am missing the periods/dots in the equation for K_traction.
% Part A for COMP1
E_m = 70000; % Elastic modulus of matrix, MPa
v_m = .33; % Poisson ratio of matrix
E_i = 250000; % Elastic modulus of inclusion, MPa
v_i = .2; % Poisson ratio of inclusion
% Fiber volume fraction
f_i = 0:0.01:1;
% 0 is 0% fiber and 1 is 100% fiber content
% points to be plotted
K_m = (E_m)/(3*(1-2*(v_m))); % Bulk modulus of matrix, MPa
K_i = (E_i)/(3*(1-2*(v_i))); % Bulk modulus of inclusion, MPa
s1 = (1+v_m)/(3*(1+v_m));
K_traction = K_m*(1+(f_i*((K_m/(K_m-K_i))-s1)^-1)^-1);
K_disp = K_m*((1-(f_i*(((K_m)/(K_m-K_i))-s1)^-1).^-1));
% Plotting
plot(f_i,K_traction, 'Color', 'red', 'LineWidth', 2.5);
grid off;
title('Bulk Modulus vs. Inclusion Volume Fraction')
xlabel('Inclusion Volume Fraction, f_i')
ylabel('Bulk Modulus, K [MPa]')
hold on
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!