Welcome Guest! To enable all features please Login. New Registrations are disabled.

Error

### Login

 Previous Topic Next Topic
 OchkovVF #1 Posted : 17 February 2024 20:50:02(UTC) Rank: Advanced MemberGroups: Registered, Advanced MemberJoined: 06/04/2023(UTC)Posts: 331Was thanked: 21 time(s) in 21 post(s) Hi all!I'm trying to solve a problem about a circle inscribed in a triangle using Newton's method. The Root function does not work.I have some questions with how muted operators work - I don't want to set the value n - I want to use a hybrid operators for and while.What am I doing wrong? Triangle-Circle-Newton.sm (144kb) downloaded 5 time(s).See please more https://community.ptc.com/t5/Mathcad/Malfatti-circles/td-p/687281https://community.ptc.co...ze/large?v=v2&px=999Edited by user 17 February 2024 21:10:36(UTC)  | Reason: Not specified
 Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.
 mkraska #2 Posted : 18 February 2024 04:11:37(UTC) Rank: Advanced MemberGroups: Registered Joined: 15/04/2012(UTC)Posts: 1,986Was thanked: 1124 time(s) in 721 post(s) Hi, first of all you have to keep hands off i if you handle complex numbers. Don't use it as iterator variable.Second, I am not sure what for(4) actually does. Unfortunately I can't break down it to a minimum working example. The disabled region should work as the for(3) loop with exit condition but it doesn't (somehow gets stuck). Tests with trace showed that inside the for(4) loop the arithmetics seem to be rotten. For comparison I added a loop-free implementation of the algorithm by just repeating the commands in the sheet.Once one accepts the complex numbers, the algorithm converges to a reasonable solution. Yet, the radius turns out negative for the given initial guess. This can happen because only the square of the radius occures in the model. Triangle-Circle-Newton_kr.sm (195kb) downloaded 5 time(s). Martin Kraska Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx 1 user thanked mkraska for this useful post. on 18/02/2024(UTC)
 Jean Giraud #3 Posted : 18 February 2024 04:23:08(UTC) Rank: GuestGroups: Registered Joined: 04/07/2015(UTC)Posts: 6,866Was thanked: 981 time(s) in 809 post(s) Originally Posted by: OchkovVF What am I doing wrong?Augmented version of the original MCD 11Jean Maths Triangle ScaleneInscribed.sm (42kb) downloaded 5 time(s). 1 user thanked Jean Giraud for this useful post. on 18/02/2024(UTC)
 StvMath #4 Posted : 18 February 2024 06:10:33(UTC) Rank: Advanced MemberGroups: Registered Joined: 26/07/2022(UTC)Posts: 33Location: UKWas thanked: 20 time(s) in 17 post(s) I don't think you've actually adopted the KISS principle here Valery! The attached seems much simpler. Triangle-Circle-Newton_stvmath.sm (117kb) downloaded 17 time(s). 1 user thanked StvMath for this useful post. on 18/02/2024(UTC)
 Users browsing this topic
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.