Wang Gaoteng

173 Reputation

12 Badges

10 years, 273 days

MaplePrimes Activity


These are replies submitted by Wang Gaoteng

@tomleslie 

Hi, thanks a lot. The llsFit.mw is very helpful.

Best regards.

@Preben Alsholm 

Hi, Preben, thank you very much. The spline is very perfect, but in my case, I must use the circluar arc to fit the data, and I find there is a thread which maybe useful.

Best regards.

@tomleslie 

Hi, the cubic spline is very perfect, but sometimes it is hard to generate in some softwares(OPERA). For example, I can generate the spline in solidworks, and import the component to this software for simulation, but in the software, I must generate the coils which should around the component. The software provides the circular arc coils, so it is hard to change the circular arc coils as spline-like coils. 

Best regards.

@acer 

Hi acer, the DirectSearch package can get solutions. It is easy to use and powerful.

Best regards.

@Preben Alsholm 

Hi, Preben Alsholm, thank you very much. 

Those days, I find that there is another way to get the solutions, the DirectSearch package, which was written by Dr. Sergey Moiseev,  this package is very powerful. Thanks Dr. Moiseev.

By the way, I copy the DirectSearch.hdb to the folder /lib/ according to readme.txt, but after

?DirectSearch issued in maple, the maple help presents that no help page about DirectSearch exist.

P.S. The .hdb should be converted to .help using helptools in maple18 or higher version.

 

Best regards.

@acer 

Hi, acer, thanks a lot. You reply is very clear and understandable, and the codes  are very helpful.

The following are codes which I learn from yours. f2 is a circle, and f1 is the tangent line of f2, I trid Digits from 10 to 80, it seems its hard to get all real solutions when H changes from -0.18 by 0.03 to 0.18. But the tangency points are actually exist. 

Is there any way to get the tangency points?

Best regards.

---------------------------------------------------------------------------------------

r := proc (H)
local f0,f1, f2, k, d,sol;
f0:= 0.585=abs(k*(0.585+H*cos(20*Pi/180))+0.585-H*sin(20*Pi/180))/sqrt(k^2+1);
f1:=y=fsolve(f0,k)*x;
f2 := (x-0.585-H*cos(20*Pi/180))^2+(y+0.585-H*sin(20*Pi/180))^2=0.585^2;
for d from 10 to 80 do
Digits := d;
sol := fsolve({f1,f2});
if type(eval(sol, 1), specfunc(anything, fsolve)) then
next;
else
break;
end if
end do
end proc;
for H from -0.18 by 0.03 to 0.18 do r(H) end do

---------------------------------------------------------------------------------------

@Carl Love 

Hi, Carl, thank you very much. I finally find that it is my fault that just in the beginning of the line "r4:=fsolve(f4):", it is text mode, not the math mode. So I rewrite the problem line in math mode, then no error occured.

But there is also another problem I encountered those days, it is about fsolve and solve.The codes as the following:

----------------------------------------------------------------------------------------------------------------

f1 := {y = tan(-8*Pi*(1/180))*x, (x-cos(-8*Pi*(1/180))-sin(-8*Pi*(1/180)))^2+(y-sin(-8*Pi*(1/180))+cos(-8*Pi*(1/180)))^2 = 1};

fsolve(f1);

solve(f1);

-----------------------------------------------------------------------------------------------------------------

In the codes above, fsolve(f1) will give no real solutions, but solve(f1) will give a real solution. In fact, the equations in f1 are a circle and one of its  tangent lines. I want to get the tangency point.

But why fsolve can not get the correct result?

Best regards.

Hi, Patrick, thank you for your kindly reply. Yes, I have produced jpg figures that look good on screen but don't print well. I agree with you that word may compress figures,and I will try to use LaTeX in the following days, hoping it may solve my problem.

Best regards!

Hi, Patrick, thank you for your kindly reply. Yes, I have produced jpg figures that look good on screen but don't print well. I agree with you that word may compress figures,and I will try to use LaTeX in the following days, hoping it may solve my problem.

Best regards!

I think there are minor mistakes in the former two animations of the attached file.

Thank you very much! After cleaning the cookies I can login the website again. Wonderful!

Best regards!

Thank you very much! After cleaning the cookies I can login the website again. Wonderful!

Best regards!

Thank you giving me so many helps! Both two solutions are very helpful!

Best regards!

Thank you giving me so many helps! Both two solutions are very helpful!

Best regards!

I try to use piecewise function to select the roots when a changes to (-0.5,0.5) , but hindered by some errors.

Can you help me?

Thank you very much!

Best regards!

12334.mw

1 2 3 4 5 6 7 Last Page 1 of 13