Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
|
![]() |
#1 |
初级会员
注册日期: 2008-10-03
年龄: 38
帖子: 6
声望力: 0 ![]() |
![]()
对称直线为y=a*x+b;
原函数为y=f(x); 对称后y3=f(x3); function y=invert(a,b) disp('PLease input x') x=input('x='); disp('PLease input y') y=input('y='); disp('PLease input a') a=input('a='); disp('PLease input b') b=input('b='); Y=a*x+b; x2=(x+a*y-a*b)/(1+a^2); y2=a*x2+b; x3=2*x2-x; y3=2*y2-y; plot(x,y,'b'); hold on plot(x3,y3,'b'); hold on plot(x,Y,'r'); hold on %若函数y1=f(x)关于与X轴平行的直线y=b对称 % 对称后y2=2*b-y1; % x2=x1; %若函数y1=f(x)关于与X轴平行的直线x=a对称 %对称后x2=2*a-x1; % y2=y1; 附验证图像 |
![]() |
![]() |