Set program angle mode
|
05-06-2024, 11:52 AM
Post: #1
|
|||
|
|||
Set program angle mode
Hello,
Is there a function to set program angle units to automatically calculate in radians? Like this jacobian matrix program Code: #cas Credits to slavomic & Arno K : topic https://www.hpmuseum.org/forum/thread-3852.html To make it automatically run in radian mode? I've found commands/ functions HAngle = 0 for Radians mode HAngle = 1 for Degrees mode HAngle = 2 for Gradians mode HAngle:=0; But when I add this code, Error bad argument, or it stays in Degree mode leaving "pi" in derivates. Code: #cas I just want to leave my calculator in Degree mode, but when I input the jacobian matrix and run the program for it to be automatically in radian mode so I don't have to manually change Degrees-> Radian ( input, and run program) then return to Degrees hope you understand what im trying to achieve. |
|||
05-06-2024, 01:18 PM
(This post was last modified: 05-06-2024 01:20 PM by StephenG1CMZ.)
Post: #2
|
|||
|
|||
RE: Set program angle mode
Apparently either
HAngle:= Or AAngle:= can be used from code, although there is this thread regarding a possible bug. https://www.hpmuseum.org/forum/thread-19...ght=Hangle I wonder if the problem is that HAngle is a PPL variable and the code snippets are cas? Unfortunately I don't have a HP Prime app to check. Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
05-07-2024, 07:09 AM
(This post was last modified: 05-07-2024 07:10 AM by Amer7.)
Post: #3
|
|||
|
|||
RE: Set program angle mode
(05-06-2024 01:18 PM)StephenG1CMZ Wrote: Apparently either AAngle:=1; works when I insert it after Local variables. Example: Calculator set in Degrees I run the program, it returns correct answer in radians ( and it switches calculator in Radian) it doesn't stay in degrees. I don't think it's ideal, but i think its much better than manually switching. Thank you |
|||
05-07-2024, 03:52 PM
(This post was last modified: 05-07-2024 03:52 PM by toml_12953.)
Post: #4
|
|||
|
|||
RE: Set program angle mode
(05-07-2024 07:09 AM)Amer7 Wrote:(05-06-2024 01:18 PM)StephenG1CMZ Wrote: Apparently either HAngle sets angle mode globally, AAngle sets it during the current program's run only. Tom L Cui bono? |
|||
05-08-2024, 12:34 PM
Post: #5
|
|||
|
|||
RE: Set program angle mode
(05-07-2024 03:52 PM)toml_12953 Wrote: HAngle sets angle mode globally, AAngle sets it during the current program's run only. I don't think that's correct. AAngle sets the angle mode for the current app, overriding the setting of HAngle. Every app has its own AAngle setting. It does NOT automatically reset when a program ends. Press Vars [CAS] Function Modes Help to see the Help screen about AAngle, and press Vars [Home] Settings Help to see the Help screen about HAngle. BOTTOM LINE: HAngle sets the angle mode UNLESS AAngle>0, in which case HAngle is ignored and the angle mode is set by AAngle. Yes, HAngle is global across all apps, but AAngle is not local to programs, it is different in each app. <0|ΙΈ|0> -Joe- |
|||
05-09-2024, 11:44 AM
Post: #6
|
|||
|
|||
RE: Set program angle mode
Thank you guys for the feedback!
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)