필터 지우기
필터 지우기

When I try to 3d plot the code, the plot comes out empty what should I add to fix this problem

조회 수: 1 (최근 30일)
F = [-40:20:40];
x = 0.1:0.8;
y = 0.1:0.4;
sigma_p = @(x,y) F/(.8*x*y);
sigma_mx = @(x,y) (F*y)/(1/12*(x)*(y)^3);
sigma_my = @(x,y) (F*x)/(1/12*(y)*(x)^3);
sigma_net = @(x,y) sigma_p(x,y) + sigma_mx(x,y) + sigma_my(x,y);
figure
plot3(x, y, sigma_net(x,y))

채택된 답변

Bekay.Kang
Bekay.Kang 2016년 9월 8일
To Mohsen
Actually, I don't know what exactly you want to do. But There are some problems in your code such as variable dimension(size), matrix(array) calculation...
check this out. hope this will be helpful for you.
F = [-40:20:40];
x = linspace(0.1,0.8,length(F));
y = linspace(0.1,0.4,length(F));
sigma_p = @(x,y) F./(.8.*x.*y);
sigma_mx = @(x,y) (F.*y)./(1./12.*(x).*(y).^3);
sigma_my = @(x,y) (F.*x)./(1./12.*(y).*(x).^3);
sigma_net = @(x,y) sigma_p(x,y) + sigma_mx(x,y) + sigma_my(x,y);
figure
plot3(x, y, sigma_net(x,y))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by