Mathematica Help: Automating Calculations with afindminimum Function

  • Context: Mathematica 
  • Thread starter Thread starter srik
  • Start date Start date
  • Tags Tags
    Mathematica
Click For Summary
SUMMARY

The discussion focuses on automating calculations in Mathematica using the afindminimum function. The user seeks a method to extract the minimum value directly from the function's output without manual copy-pasting. The proposed solution involves using Mathematica's built-in functions to isolate the desired numerical result, rather than relying on Take or Extract, which do not yield the required output. The user also inquires about using the % operator to reference previous results, but finds it inadequate for this specific task.

PREREQUISITES
  • Familiarity with Mathematica programming language
  • Understanding of the afindminimum function in Mathematica
  • Knowledge of Mathematica's output formatting and result referencing
  • Basic experience with Mathematica's list manipulation functions
NEXT STEPS
  • Research how to use the First function in Mathematica to extract specific elements from outputs
  • Learn about the ReplaceAll (/.) operator in Mathematica for result manipulation
  • Explore the use of patterns and rules in Mathematica to automate result extraction
  • Investigate the use of dynamic variables in Mathematica for streamlined calculations
USEFUL FOR

Mathematica users, data analysts, and researchers looking to automate calculations and streamline their workflow in mathematical computations.

srik
Messages
2
Reaction score
0
I've got a very simple problem, but I don't really know that much code. I want to automate my calculations. The function afindminimum finds a minimum value, a. I then need that value a to continue. What I'm doing right now is copy-pasting the a to define it. But I want something that takes it out of the result for afindminimum, so that I don't have to copy-paste every time.

http://i2.photobucket.com/albums/y22/srik/math1.jpg

I can extract the second part like this:

http://i2.photobucket.com/albums/y22/srik/math2.jpg

But I want just the number, the thing after the arrow. I don't think Take or Extract or whatever are helpful here. So how then?
 
Last edited by a moderator:
Physics news on Phys.org
Can you just use % to carry the previous answer forward?
 
nope, that just gives me the whole thing in the {} brackets
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 21 ·
Replies
21
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K