Input function - bad argument value
|
06-07-2023, 05:04 PM
(This post was last modified: 06-09-2023 07:31 PM by Amer7.)
Post: #1
|
|||
|
|||
Input function - bad argument value
Hi,
Folks I have a problem, my tasks became to complicated for me to calculate it all by hand ( I don't have enough time to complete the task) How can I input a function like: a1=d1*cos(alpha)+X a2=d1*sin(beta)+Y a3=d2*cos(beta) a4=d3*sin(beta) .... I can have Xx amount of these functions And then tell the program to derivation of functions by variable that in input. like alpha, beta, d1, d2 As you can see these are stored in matrix The issue is when I write the input program it doesn't let me input the function. How can I make this on Prime? 1. Issue is how do I make first input screen to let me enter the numbers of how many inputs spaces I need. 2. How do I input the function |
|||
06-07-2023, 08:05 PM
Post: #2
|
|||
|
|||
RE: Input function | |||
06-08-2023, 08:52 AM
(This post was last modified: 06-09-2023 06:08 PM by Amer7.)
Post: #3
|
|||
|
|||
RE: Input function -Bad argument value
EXPORT CAK()
BEGIN LOCAL a,i,c,b; INPUT({{a,[-1]}},"String"); return a; END; Value -1, -2 allow me to input my function d*cos(alpha) Now I need to ask the user how many input he wants, and then proceed to new input screen with input fields that user declared. I have tried to set this with simple IF loop. This part somehow doesnt work Code: BEGIN The problem is if I enter 1, or any number it just throws me to the Error line, it doesnt offer me a new input screen. EDIT; When i write it like this, I get input screen one, enter value, input screen two Code: EXPORT CAK() I get as a result bad argument value Inputs are D1*cos(Alpha), D1 When I'm in calculator (HOME) and I input diff(D1*cos(alpha),D1) i get correct value of cos(Alpha) |
|||
06-10-2023, 08:02 PM
(This post was last modified: 06-10-2023 09:08 PM by Amer7.)
Post: #4
|
|||
|
|||
RE: Input function - bad argument value
Is there any way to write the function in a matrix like
d1*cos(alpha),d2*cos(alpha)... without it returning an Error? Ok, when I MAKEMAT(0,3,1) and then i view it, end I edit the 0 to be my function. I can save it to some variable like Ss0. It will appear in matrix menu. I vectorize it. But when i do the diff(Ss0(1)/Ss1(1)) it again throws an error bad argument value "(expression,variable=value) Error Bad Argument Value" I need to make this but with functions in x and y vector by vector derivative matrix Guys I found some code for jacobian matrix, it compiles no Errors, but I doesn't want to run Code: #cas https://www.hpmuseum.org/forum/thread-3852.html Ahhh, just type jacob() in home EDIT: I think this solves my issue. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)