필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can I join both the initial and final values of a function (lineal, curve..) and the vertical axis x = 0, either for positive or negative values of it?

조회 수: 1 (최근 30일)
I have several diagrams which plot one function. I want to join both the initial and final values of a function (lineal, curve..) and the vertical axis x = 0, either for positive or negative values of it.
In other words, it is like closing the function respect to the vertical axis x=0. The function is a piecewise function. The code of one case is:
y_B1 = 0:0.01:h_poste;
Mz_B1 = -((y_B1<=h_hc).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1.*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1))+((y_B1>h_hc)&(y_B1<=h_CdPa)).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1.*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1)+M_hc+(Esf_rad_hc+Qwc(1)).*(y_B1-(h_hc+ht)))+((y_B1>h_CdPa)&(y_B1<=cdg_mensula_y)).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1.*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1)+M_hc+(Esf_rad_hc+Qwc(1)).*(y_B1-(h_hc+ht))+M_CdPa+(Esf_rad_CdPa_B+Qwc(3)).*(y_B1-(h_CdPa)))+((y_B1>cdg_mensula_y)&(y_B1<=h_sust)).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1)+M_hc+(Esf_rad_hc+Qwc(1)).*(y_B1-(h_hc+ht))+M_CdPa+(Esf_rad_CdPa_B+Qwc(3)).*(y_B1-(h_CdPa))+M_mensula)+((y_B1>h_sust)&(y_B1<=h_Feed)).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1.*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1)+M_hc+(Esf_rad_hc+Qwc(1)).*(y_B1-(h_hc+ht))+M_CdPa+(Esf_rad_CdPa_B+Qwc(3)).*(y_B1-(h_CdPa))+M_mensula+M_sust+(Esf_rad_sust+Qwc(2)).*(y_B1-(h_sust+ht)))+((y_B1>h_Feed)&(y_B1<=h_poste)).*(R_Mz_v1_B+R_Vx_B1.*y_B1+((1/2).*y_B1.*y_B1*(Qwstr1/h_poste)*(1/3).*y_B1)+M_hc+(Esf_rad_hc+Qwc(1)).*(y_B1-(h_hc+ht))+M_CdPa+(Esf_rad_CdPa_B+Qwc(3)).*(y_B1-(h_CdPa))+M_mensula+M_sust+(Esf_rad_sust+Qwc(2)).*(y_B1-(h_sust+ht))+M_Feed+(Esf_rad_Feed_B+Qwc(4)).*(y_B1-(h_Feed))));
figure
ley_Mz_B1 = plot(Mz_B1,y_B1);grid;
title('CASO DE CARGA B (Viento 1).Ley de esfuerzos flectores')
xlabel('Momento flector Mz (N·m)');
ylabel('Altura (m)');
where Mz_B1 is the function represented and y_B1 is the vector of independent values.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by