Message Boards Message Boards

Loop NSolve of simultaneous equations n=100 times?

Posted 7 years ago

Hello everyone, I am new to Mathematica. I have written this code which I want to run for say n=100 times to get new solutions for every randomly generated seed for each run. Can anyone please tell me how can I run this code for n=100 times? Thank you in advance.

Code that I have written:enter code here

Sin[Subscript[\[Theta], 12]] = RandomReal[{0.081}]
f[\[Alpha], \[Beta]] = %*Sin[\[Alpha]]*Cos[\[Beta]]
g[\[Alpha], \[Beta]] = (%%)^2*(Sin[\[Alpha]])^3*(Cos[\[Beta]])^2
NSolve[{f[\[Alpha], \[Beta]] == 0, 
g[\[Alpha], \[Beta]] == 0}, {\[Alpha], \[Beta]}]
POSTED BY: RICKY DEVI

Welcome to Wolfram Community! Please make sure you know the rules: https://wolfr.am/READ-1ST

The rules explain how to format your code properly. If you do not format code, it may become corrupted and useless to other members. Please EDIT your posts and make sure code blocks start on a new paragraph and look framed and colored like this.

int = Integrate[1/(x^3 - 1), x];
Map[Framed, int, Infinity]

enter image description here

POSTED BY: Moderation Team
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