Problem with equation in Programming
|
05-29-2015, 02:38 PM
Post: #1
|
|||
|
|||
Problem with equation in Programming
Hi guys i have a problem with a program, i need solve a 3grade equation, i input the code but i dont have the solution
When i solve in home window i have the solution, why? code: Code: EXPORT prueba1() programming: home window: :3
|
|||
05-29-2015, 05:47 PM
Post: #2
|
|||
|
|||
RE: Problem with equation in Programming
This seems to work:
Code:
|
|||
05-29-2015, 05:54 PM
Post: #3
|
|||
|
|||
RE: Problem with equation in Programming
no, take me the same error
"{}" :3
|
|||
05-29-2015, 06:40 PM
Post: #4
|
|||
|
|||
RE: Problem with equation in Programming
If you want "that" result, this take you there:
Code:
|
|||
05-29-2015, 08:50 PM
(This post was last modified: 05-29-2015 08:55 PM by nakjaen.)
Post: #5
|
|||
|
|||
RE: Problem with equation in Programming
no, it is part of a bigger program, the variables are obtained and then solve the equation
I do not understand why other equations solved and that no how i can use function fsolve? :3
|
|||
05-29-2015, 10:29 PM
Post: #6
|
|||
|
|||
RE: Problem with equation in Programming
There are two pertinent points:
1. The formula used in your program is not the same as the formula used to manually produce the values in your screenshot. The difference is in the paren's. 2. Local variables in HOME mode don't cross over to CAS mode as expected. That is why the snippet I sent (with GLOBAL variables) produces the same result as obtained in your screenshot; or, conversely, why your program isn't working as you expect. There are ways to get around this, such as by not mixing HOME and CAS program constructs, use of global variables, and possibly other means. You can work out the details from this information. |
|||
05-30-2015, 12:08 PM
(This post was last modified: 05-30-2015 12:10 PM by DrD.)
Post: #7
|
|||
|
|||
RE: Problem with equation in Programming
This is closer to your original program, with output matching your screenshot:
Code:
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)