Is there a program where you type in equations and change only variables? - Page 1
Forum section: electronics / general

author: Beamin
author_rank: Super Contributor
timestamp: July 22, 2018, 06:40:09 pm
content: Hopefully in the near future I will be going back to school. As I remember so much of my time was spent doing big long equations that would fill up two chalk boards that only had one, two or three inputs. That takes forever when you have 40 data points you took during the experiment. I remember spend 10 minutes to figure out the equation once let alone multiple times.Is there something where you type in the equation once then just feed it a few variables click a button then get your answer? I realize you can write computer programs to do this but I'm not a programmer and learning it would take away from my studies.

author: ataradov
author_rank: Super Contributor
timestamp: July 22, 2018, 06:50:21 pm
content: You can try to do something like this with Excel or OO Calc.But really, Python is perfect for this kind of stuff. You can start slow with just this basic requirement to evaluate formulas, but then when you need more, it is easy to get what you want. It is extremely easy to get started with Python and not having time is not a good excuse here.Other options would be Matlab or Octave. Matlab has a $150 personal use licence and I highly recommend it. It is a powerful tool.

author: MaxSimmonds
author_rank: Contributor
timestamp: July 22, 2018, 07:33:52 pm
content: I certainly agree with this. But, as an alternative to Matlab, I've used scilab which is almost identical to matlab, but free!https://www.scilab.org/here's a link to the site, it's fairly intuitive to use, and the syntax wouldn't differ much from excel, hence you wouldn't need to be proficient in programming to get to grips with it. You can easily change the variables of your equation, and I'm sure if you need any help with writing the equation it wouldn't take more than a few mins to explain.hope it helps!

author: Berni
author_rank: Super Contributor
timestamp: July 22, 2018, 07:36:29 pm
content: Excel is very good for making little dedicated calculation widgets like this. Mainly because you can lay things out in a logical way and label all the inputs and add instructions next to them.For calculating things just once on the fly i just use SpeedCalc as a replacement for the windows calculator. You type out the whole equation and it spits out the result and appends it to your calculation history. Simple, free, convenient.Python is also useful as a calculator as previously pointed out. Typing out a math expression in to the live console just spits out the result and you can use variables to hold intermediate results. However when you close the console its all gone. Alternatively you can get more excel functionality from it by writing your whole calculation into a .py file as a program and running it. Potentially very powerful, but perhaps not as quick and convenient.

author: IanB
author_rank: Super Contributor
timestamp: July 22, 2018, 08:16:10 pm
content: If you want something really simple on Windows you could try my little calculator (attached). I wrote it when I wanted something like you describe.What it does do:- evaluates simple expressions involving values and variables on the command line- assigns results to new variables- permits command line recall to repeat expressions with different values- calculates exact numeric derivatives of expressionsWhat it doesn't do:- trig in degrees- engineering notation- binary/octal/hex conversions- the parallel resistance operator- save results from one session to the next

author: voltsandjolts
author_rank: Unknown
timestamp: July 22, 2018, 08:49:17 pm
content: +1 for Octavehttps://www.gnu.org/software/octave/Free, open source and good compatiblity with Matlab for the level you are working at.Note on Win10 there is slight issue with the command terminal which makes backscrolling impossible right now. A workaround is to type 'pause' command and then you can backscroll. Something changed in Win10 recently to cause this.

author: Brumby
author_rank: Unknown
timestamp: July 23, 2018, 12:39:43 am
content: I would have said Excel first out of the gate - but Open Office Calc uses almost identical syntax and is free.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 02:19:09 am
content: Quote from: ataradov on July 22, 2018, 06:50:21 pmIf python is anything like C you use to make the Arduino work that's more trouble then its worth. I do see the huge value in C but learning it was more of a chore to make my gadgets work then actually building the hardware. These equations are big and long; I didn't think you could put such things into excel. The point is to spend minimal time typing in the equation as it will be different for each experiment. One is probably 1/3 page hand written.

author: IanB
author_rank: Super Contributor
timestamp: July 23, 2018, 02:31:22 am
content: Quote from: Beamin on July 23, 2018, 02:19:09 amOf course you can. But you don't have to put the whole thing into one cell formula. You can break it down into parts.I and my colleagues set up extremely complex calculations in Excel, including solving sets of non-linear simultaneous equations.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 02:59:50 am
content: Quote from: IanB on July 23, 2018, 02:31:22 amI guess when excel first came out people on wall street realized you could do technical analysis with it and make huge amounts of money, or at last had an edge on the firms that didn't. I always feel if I was born 10 years sooner I would be rich like some of my family members that saw the same trends as me but were in a position and had money to start up such businesses. When I was a kid I wanted to buy domains of every company I could think of but my father had the credit card, was a dick, and was opposed to seeing someone else think of an idea that he didn't. Would have saved him thousands in college money. Cocacola.com was the first one I thought of. I would have made hundreds of millions because I wanted to rent the domains.

author: ataradov
author_rank: Super Contributor
timestamp: July 23, 2018, 03:50:41 am
content: Quote from: Beamin on July 23, 2018, 02:19:09 amThat's the whole point that it is not. But if you don't want to spend 20 minutes to give it a try, then it is probably not for you.Quote from: Beamin on July 23, 2018, 02:19:09 amThere is no need to think, you can. Well, Excel is capable of it, I don't know if you specifically can.Quote from: Beamin on July 23, 2018, 02:19:09 amWith Python it is as minimal as it gets. And even C on PC is not all that much more complicated.

author: ataradov
author_rank: Super Contributor
timestamp: July 23, 2018, 03:53:59 am
content: Quote from: Beamin on July 23, 2018, 02:59:50 amNope, he was a smart man. Coca Cola could easily take that domain from you for the price of a trademark lawyer.This type of business is not as profitable as you think.But this has nothing to do with the topic.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 03:58:40 am
content: Quote from: ataradov on July 23, 2018, 03:50:41 am20 minutes? So it's like Vbasic or regular basic simple? That I could do. If you judge python at 20 minutes how long for C two or three hours? I know to understand C a little bit I watched six hours of tutorials starting with a "hello world" program level. The syntax always screws me up but if its really that simple I would give it a try. Where is my Raspberry pi? Seriously do you remember where I put it? I have a pi nano I want to try out but it takes odd sized connectors. I have never seen connectors that size and don't even know what they are called.

author: ataradov
author_rank: Super Contributor
timestamp: July 23, 2018, 04:09:55 am
content: Quote from: Beamin on July 23, 2018, 03:58:40 amWhat does RPi has to do with anything here? I'm not sure what is the point of this thread if you are going to dismiss all the proposals without evaluating them yourself?Also cocacola.com was registered in October 1994. I seriously doubt you had Internet access back then.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 04:23:52 am
content: Quote from: ataradov on July 23, 2018, 04:09:55 amMy father was an EE where his work paid for a terminal at our house. He was making what he called "the back bone of the internet" and told us how he was going to get rich(er) once his company was listed on the NYSE or "go public". A competitor went public first and later I found my father invested half his money in it hedging his bet. So yes some of us had the internet, it wasn't cheap (hundreds or thousands per month) since we lived beyond some certain distance from the phone company. It was like the BBS systems but slightly faster. One of my friends had it too and we would use email, gopher, telnet or some primitive programs. His dad did some other EE thing for a defense company.At some point in your life one of your packets of data traveled over one of my fathers boards.Dismiss proposals? I just said I am going to find my raspberrypi and try python again on your suggestion.. I also downloaded that .zip file and going to try the free math lab program. The only thing I dismissed was writing in C as it's easier to do the equations, but now I have three options to try.

author: ataradov
author_rank: Super Contributor
timestamp: July 23, 2018, 04:25:44 am
content: Quote from: Beamin on July 23, 2018, 04:23:52 amWhy do you need Raspberry Pi? Do you have a regular computer? Use it.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 04:33:27 am
content: Quote from: ataradov on July 23, 2018, 04:25:44 amI originally bought the Pi for its GPIO and if I learn python I can use it instead of the Arduino with the C I have to copy and paste. It would be really cool if there was something like visual basic for the rPi. A program where you don't care about the code looking nice or being efficient, it just needs to do what you need. Like dragging and dropping bits of programs like counters and triggers off the GPIO. A GNU radio style where you visually put the parts together in a flow chart. Also with the rpi you don't have to worry about memory or speed like an Arduino with limited resources.

author: ataradov
author_rank: Super Contributor
timestamp: July 23, 2018, 04:36:52 am
content: Quote from: Beamin on July 23, 2018, 04:33:27 amWhy are you intentionally making things harder for yourself? Using Python for evaluating formulas and controlling GPIOs are two very different things. You are not going to learn everything in 20 minutes. My estimate was just for the simple calculator-like use.Arduino and PRi have absolutely nothing to do with this discussion. I don't understand why you are bringing them up.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 04:41:20 am
content: Quote from: ataradov on July 23, 2018, 04:36:52 amI don't think in a straight line. I consider all uses at the same time and often bring things up, people will reply with something I didn't think of like "a calculator is easier in python then working the GPIO", that I wouldn't know if I didn't say anything.

author: Brumby
author_rank: Unknown
timestamp: July 23, 2018, 04:43:11 am
content: You seem to be mixing two subjects here - big equation handling and SBC hardware. That's like trying to make a parachute while you're in free fall.I'll answer only to the calculation question:Excel (or OO Calc) can do incredibly complex calculations. You just have to lay them out in chunks, which a logical approach to the task would naturally lead you to.I've done a few spreadsheets where one worksheet has some basics - such as input data and results - with the calculations being performed in another worksheet (or two) where hundreds of cells are used.Also, there are numerous resources for hints and tips on the internet for how to do a wide range of less than obvious tasks.

author: Whales
author_rank: Super Contributor
timestamp: July 23, 2018, 05:30:58 am
content: Heads up if you want to use OpenOffice: the project was obtained by Oracle and many of the devs fled (or were fired? it's been a few years). The project has spiritually continued asLibreOffice. If you try and download openoffice you will get something that has not had much other than minor maintenance updates for years, and Oracle branding.

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: July 23, 2018, 06:03:29 am
content: Quote from: Beamin on July 22, 2018, 06:40:09 pmLong ago I used to use TK!Solver, before someone at work stole my copy:https://en.wikipedia.org/wiki/TK_SolverIt still exists, but it isn't cheap:https://www.uts.com/ItemDetails.asp?ItemID=0100-50-0010-00The advantage was you could specify some of the input and output values, and it would solve for the unknowns. In other words, it was up to you which variables were inputs and which were outputs, and you could easily reclassify them.

author: Brumby
author_rank: Unknown
timestamp: July 23, 2018, 06:08:31 am
content: Quote from: Whales on July 23, 2018, 05:30:58 amSorry. My references to Open Office were wrong - it IS Libre Office now.

author: Whales
author_rank: Super Contributor
timestamp: July 23, 2018, 06:50:52 am
content: Quote from: Brumby on July 23, 2018, 06:08:31 amDon't be sorry. Name changes like this are an absolute PITA, the fact you know at all is good.Name discontinuity creates big problems for users, just as much as over-continuity (keeping the name but changing the product). We're seeing mostly the latter these days (Skype, GNOME, Windows, many game releases reverting to successor's names, etc) so it's easy to forget about the former.

author: rstofer
author_rank: Super Contributor
timestamp: July 23, 2018, 02:12:53 pm
content: If it involves math, Matlab is the answer. They have a 'personal' license so it's not terribly expensive. I really like the optional Simulink package. It includes blocks for creating analog simulations identical in concept to an analog computer. Very cool!Fortran - I'm an old time Fortran programmer and I write a lot of demo code to show my grandson how to do various math operations like we did it in the good old days. Simple things, like Riemann Sums are so easy to demonstrate with Fortran (or any other language).Desmos.com - absolutely ideal for graphing functions. This comes up a LOT in working through his Calculus program.Symbolab.com - if you want to see how to solve math problems, this is the place. If you subscribe, you can get more detailed solutions but it isn't necessary.Python and it's numeric libraries - This is the modern way to do math. Alas, I'm going to stick with Fortran. Buy books related to Python and Math to get specific help.

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: July 23, 2018, 02:18:53 pm
content: https://www.desmos.com/calculator/izrcjwqp8iThere's a very nice "graphing calculator" app too, for Macs, PCs and mobiles.

author: Beamin
author_rank: Super Contributor
timestamp: July 23, 2018, 02:43:09 pm
content: Quote from: rstofer on July 23, 2018, 02:12:53 pmI would use fortran but my six foot tall 400lbs tape drive needs new clutches.I thought LibreOffice was really good and had lots of support as its the Linux version of word. I have a copy of office 200X on CD; before they started doing this ridiculous monthly cloud service/payments. I use office twice a month I can't afford a monthly charge that never ends. Best way to go broke is to set up monthly payments for a whole bunch of little things.

author: Ducttape
author_rank: Regular Contributor
timestamp: July 23, 2018, 03:25:22 pm
content: Quote from: thermistor-guy on July 23, 2018, 06:03:29 amBrilliant program for solving sets of simultaneous equations. Essentially you type in an equation on the equation sheet and when you hit 'enter' the variable sheet immediately lists all of the variables in your equation. And on each variable's line there are columns labeled 'input' and 'output'. Enter another equation and any additional variables used are now added to the variable sheet. Any variable values you know you simply add to the input column next to the variable. Any time you want to see if you've input enough known values to solve for the others you click on the 'solve' button. If it can find a solution then the calculated values appear in the 'output' column next to the variables that weren't input. And if an iterative solution is needed you can choose which variable to vary, give it an initial value and hit 'solve'.I can't stress enough how easy it is to use. They must have absolutely DISMAL marketing since this program should sell like hotcakes. I wish someone would buy them out and do justice to it. It could use a little UI updating also, but the foundational concept of its UI is perfect IMO.

author: TerraHertz
author_rank: Super Contributor
timestamp: July 23, 2018, 05:20:36 pm
content: Nobody is mentioning Mathematica. Has anyone here tried it?

author: MaxSimmonds
author_rank: Contributor
timestamp: July 23, 2018, 05:38:34 pm
content: Quote from: TerraHertz on July 23, 2018, 05:20:36 pmI've used it, and as a symbolic solver, it's great. The website offers a very basic version of Mathematica -http://www.wolframalpha.com- helped me a lot when I wanted to check answers to my questions before. It use to (not sure if it does now) show you the process of solving equations to. For example, the breakdown of an integration. IIRC, you were only allowed this 3 times a day, which is one reason the Mathematica package was much much better.

author: joeqsmith
author_rank: Super Contributor
timestamp: July 23, 2018, 08:18:55 pm
content: I used to use Borland's Eureka. Later Mercury. These are both DOS applications. I still use MathCAD and believe they still offer it.I managed to get a 64-bit version of Octave working. Pain. Maybe it's better now.

author: joeqsmith
author_rank: Super Contributor
timestamp: July 23, 2018, 08:20:03 pm
content: Quote from: TerraHertz on July 23, 2018, 05:20:36 pmNow if you want to read an interesting book, look at the history of the guy who wrote it.

author: PartialDischarge
author_rank: Super Contributor
timestamp: July 23, 2018, 08:40:33 pm
content: I’m surprised no one mentioned Derive, extremely powerful and easy to use. Still my prefered for hardcore math. Of course the interface is old, but I started using it with msdos so I’m used to it.This program can handle algebraic formulas with undefined variables like a juggler. Complex numers? Not a problem. Want to evaluate pi with 20000 decimals? Not a problem. Matrixes? not a problem. Jacobians, gamma functions? Not a problem...One of the few math programs that can solve ( itdoessolve it ) an equation like ax^4+bx^3+cx^2+dx+e=0, giving general equations with a,b,c,d,e.

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: July 24, 2018, 12:27:58 am
content: Quote from: MasterTech on July 23, 2018, 08:40:33 pmFor symbolic manipulation and arbitary precision arithmetic, I used to use MuPad and MuPad Light:https://en.wikipedia.org/wiki/MuPADVery powerful, like Derive.

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: July 24, 2018, 12:45:30 am
content: Quote from: Ducttape on July 23, 2018, 03:25:22 pmIt was easy to use, and the marketing even back then was dismal. I remember finding a way to use Tk!Solver to calculate the transient reponse of electrical circuits. It was a very impressive application.

author: djacobow
author_rank: Super Contributor
timestamp: July 24, 2018, 12:57:09 am
content: MathCad used to be nice for making a "live" notebook. It had some symbolic solving capabilities, but was mostly a numerical thing.It looks like it still exists:https://www.ptc.com/en/products/mathcad

author: ChunkyPastaSauce
author_rank: Unknown
timestamp: July 24, 2018, 01:48:26 am
content: Sage is pretty awesome, it's worth checking out.https://en.wikipedia.org/wiki/SageMathhttps://github.com/sagemath/sage-windows/releases

author: thermistor-guy
author_rank: Frequent Contributor
timestamp: July 24, 2018, 03:27:15 am
content: Maxima (computer algebra system) on-line:http://maxima-online.org/http://elearning.cerfacs.fr/miscellaneous/tools/maxima/index.phpThe OP can try this before downloading anything.

author: sibeen
author_rank: Frequent Contributor
timestamp: July 25, 2018, 01:10:39 am
content: Quote from: djacobow on July 24, 2018, 12:57:09 amMathcad went from the standard mathcad to mathcad prime, where the parent company completely screwed the pooch.I still use mathcad 14 on a daily basis and wouldn't touch the new program with a barge pole.

author: djacobow
author_rank: Super Contributor
timestamp: July 25, 2018, 04:38:55 pm
content: Quote from: sibeen on July 25, 2018, 01:10:39 amThat's a shame. It was a cool piece of software. I used it when it was brand new in the early 1990s. In fact, I think I may vaguely remember a pre-windows version.

author: rstofer
author_rank: Super Contributor
timestamp: July 25, 2018, 06:13:53 pm
content: Quote from: thermistor-guy on July 24, 2018, 03:27:15 amwxMaxima for Windows is excellent. I use it in addition to Matlab, mostly because I started using it earlier. I am transitioning to Matlab but if I didn't want to pay for Matlab, Octave and wxMaxima would be my choices.There are situations where I prefer Fortran...