Message Boards Message Boards

0
|
9844 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Is there a good tutorial on Procedural Programming?

Posted 7 years ago

I still consider myself new with Wolfram programming, I've been teaching myself wolfram for about six months now and I've got a few programs to do stuff when I hit shift enter. Now I've been tasked to make a program that basically monitors a variable and run a command when the threshold is passed i.e. when water level rises past 10inches count one instance and record it (the water level varies inconsistently). I found dynamic and do and if and else and while, but I can't seem to wrap my head around the procedural programming from the documentation itself. I can get a dynamic monitor function. The problem with while is that it stops evaluating after the condition has been met & the wording in the Loops and Control Structures documentation is tooooo confusing for my brain.

Is there a good tutorial video I can watch or is there someone out there that I could connect with to get this programming language into my brain? Or something simpler I could grasp, or a page with different wording? or anything helpful that you guys know of?

Long story short I want my program to monitor a condition, and run the "count" function once when the condition is satisfied. I feel like running the monitor function dynamically is a good start, but I don't know how to 'knock down the rest of the dominoes' one time, when the dynamic condition turns true.

Thanks in advance ladies and gentlemen.

POSTED BY: Bill Norman
2 Replies

More broadly (these are textbooks, not tutorials), you may want to look at Mangano's (somewhat dated, but still useful) Mathematica Cookbook and Wellin's more recent Programming with Mathematica (see also his other books on http://www.programmingmathematica.com/books.html).

POSTED BY: Arno Bosse

Have a look at the functionality described here: https://reference.wolfram.com/language/guide/TimedEvaluations.html So you can execute repeatedly a piece of code over time, without hogging all your cpu cycles by using a while loop or so...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract