필터 지우기
필터 지우기

How to adjust edge line spacing using fsurf

조회 수: 1 (최근 30일)
Li Xu
Li Xu 2021년 8월 9일
댓글: Li Xu 2021년 8월 9일
Hi friends
I would like to ask how to adjust the spacing of edge lines in 'fsurf' function. I will attch my code down here. Hope a hero can pop up and save my day:).
%% numerical parameters
e=0.5625;
fc=64.1741;
ft=64.1741/26.29;
m=3*(fc^2-ft^2)/fc/ft*e/(e+1);
%% variable identification
r = @(theta) (4*(1-e^2)*(cos(theta)).^2+(2*e-1)^2)./(2*(1-e^2)*cos(theta)+(2*e-1)*(4*(1-e^2)*(cos(theta)).^2+5*e^2-4*e).^0.5);
I1 = @(tao,theta) (1-1.5*(tao/fc).^2-m*(tao/fc)/sqrt(6)*r(theta))/m*sqrt(3)*fc;
funx = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta+2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
funy = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-1/3*pi)+I1(tao,theta)/sqrt(3));
funz = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
h(1)=fsurf(funx,funy,funz,[0 300 -pi/3 pi/3]);
hold on
h(2)=fsurf(funy,funz,funx,[0 300 -pi/3 pi/3]);
hold on
h(3)=fsurf(funz,funx,funy,[0 300 -pi/3 pi/3]);
set(h,'edgecolor','k');
set(h,'facecolor','none');
set(h,'FaceAlpha',0.5);
grid off

채택된 답변

KSSV
KSSV 2021년 8월 9일
PRoceed like this:
clc; clear all ;
%% numerical parameters
e=0.5625;
fc=64.1741;
ft=64.1741/26.29;
m=3*(fc^2-ft^2)/fc/ft*e/(e+1);
%% variable identification
r = @(theta) (4*(1-e^2)*(cos(theta)).^2+(2*e-1)^2)./(2*(1-e^2)*cos(theta)+(2*e-1)*(4*(1-e^2)*(cos(theta)).^2+5*e^2-4*e).^0.5);
I1 = @(tao,theta) (1-1.5*(tao/fc).^2-m*(tao/fc)/sqrt(6)*r(theta))/m*sqrt(3)*fc;
funx = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta+2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
funy = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-1/3*pi)+I1(tao,theta)/sqrt(3));
funz = @(tao,theta) -(sqrt(2)/sqrt(3)*tao.*sin(theta-2/3*pi-1/3*pi)+I1(tao,theta)/sqrt(3));
m = 100 ; n = 100 ;
tao = linspace(0,300,m) ;
theta = linspace(-pi/3,+pi/3,n) ;
[tao,theta] = meshgrid(tao,theta) ;
% h(1)=fsurf(funx,funy,funz,[0 300 -pi/3 pi/3]);
% hold on
% h(2)=fsurf(funy,funz,funx,[0 300 -pi/3 pi/3]);
% hold on
% h(3)=fsurf(funz,funx,funy,[0 300 -pi/3 pi/3]);
figure
hold on
h(1)=surf(funx(tao,theta),funy(tao,theta),funz(tao,theta)) ;
h(2)=surf(funy(tao,theta),funz(tao,theta),funx(tao,theta)) ;
h(3)=surf(funz(tao,theta),funx(tao,theta),funy(tao,theta));
set(h,'edgecolor','k');
set(h,'facecolor','none');
set(h,'FaceAlpha',0.5);
grid off

추가 답변 (1개)

Walter Roberson
Walter Roberson 2021년 8월 9일
  댓글 수: 1
Li Xu
Li Xu 2021년 8월 9일
Thanks man! This will be extremely helpful for me!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Fit Postprocessing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by