How do i plot the 3d profiles graph located below in matlab.
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
I am looking to reproduce the graph below. I have the formula and I am using matlab. But I can only get an arc. I cannot get the graph to look like that. Thanks
채택된 답변
Joseph Cheng
2014년 7월 22일
편집: Joseph Cheng
2014년 7월 22일
This should get you close to where you need to go
[X,Y] = meshgrid(-8:.5:8);
R = sqrt(X.^2 + Y.^2) + eps;
Z = sin(R)./R;
h=figure;
ax=surf(X,Y,Z,'EdgeColor','none');
set(gca, 'Color', 'None')
set(gcf,'Color',[0 0 0])
box on
set(gca,'Ycolor',[1 1 1])
set(gca,'Xcolor',[1 1 1])
set(gca,'Zcolor',[1 1 1])
grid off
set(gca,'linewidth',1.2)
댓글 수: 13
the thing is my formula is this [x,y]=meshgrid(-.002:.0005:.002, -.0006:.0002:.0006); m = .619211*x.^2; j = (53913.*x.^8.* + 2560.*x.^6).^1/2; l = j.*232.192; q = l - 53913.*x.^4; f = q.^1/3; n = m./f; g = (53913.*x.^8.^2 + 2560.*x.^6).^1/2; h = 232.192.*g; k = h - 53913.*x.^4.; b = .0011982.*(k).^1/3; z = f - b; surf(x,y,z);shading interp
and so it's not just like a regular figure. it came with a formula for which i had to solve for and then graph but my graph isn't coming out like theirs and they used the same formula
Joseph Cheng
2014년 7월 22일
편집: Joseph Cheng
2014년 7월 22일
So the question isn't how to get your curve to look like the 3d figure but why is your curve not the same. and please edit using the code{} button so it is legible.
Joseph Cheng
2014년 7월 22일
편집: Joseph Cheng
2014년 7월 22일
One thing i noticed is that your equations take no account for y. So that's one reason you only get arc. There is no y axis component in your equations therefore for all instances of y you'll get only variation in x.
how would i be able to fix that?
if true
% code
end
[x,y]=meshgrid(-.002:.0005:.002, -.0006:.0002:.0006);
m = .619211*x.^2;
j = (53913.*x.^8.* + 2560.*x.^6).^1/2;
l = j.*232.192;
q = l - 53913.*x.^4;
f = q.^1/3;
n = m./f;
g = (53913.*x.^8.^2 + 2560.*x.^6).^1/2;
h = 232.192.*g;
k = h - 53913.*x.^4.;
b = .0011982.*(k).^1/3;
z = f - b;
Joseph Cheng
2014년 7월 23일
편집: Joseph Cheng
2014년 7월 23일
Very dumb question, but have you checked that you are using the same equations they are? Just from the code, I do not recognize what is being accomplished here and i only have your set to try to fit some y in there? Are all your units correct?
Here, i attached a blow up screen shot(the bottom pic) of what the equation that i am using is. so my x value is the radius(a), my y value is the pressure(p) and my z value is height(h). Pressure should be a constant right? but yesterday i rearranged it and included y in the equation as a variable and the top picture is what i got when solving for z. is it correct?
Joseph Cheng
2014년 7월 23일
편집: Joseph Cheng
2014년 7월 23일
No attachment, also if your y axis is pressure which you say is a constant how would you expect there to be variations in the y axis?
here's the attachment
here
Okay well i would recheck your equations and get it to be a function of positional x,y, and z space as it looks like that is the axes the plots are in. If the equation turns out to be deflection and runout from the center you can get the runout from center as a function of x and y.
okay thank you, sorry i'm just an intern....
추가 답변 (0개)
카테고리
도움말 센터 및 File 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!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
