Numerical Simulations

  • #1
222
9

Main Question or Discussion Point

I'm very new to Mathematica/programming and I want to do a theoretical calculation using Mathematica,
suppose I have,

##Y=CX,~~~C=constant##

Now, I want to plot Y vs. X but X should run at every point since every point is a solution for Y, how should I do this? Before, I was thinking maybe I could just give the domain (i.e. from 0 to 100 with interval 1) and then just let Mathematica do it, but I was wrong since Mathematica should calculate the value of Y for a certain X for one round then input another point then run again, etc.

Background:
* I'm really a beginner, I can just do the basic stuff in Mathematica (arithmetic, calculus, etc)
* Hands on start to mathematica (Wolfram website)
* Mathematica: A Problem Centered Approach by Roozbeh Hazrat (https://www.amazon.com/dp/1849962502/?tag=pfamazon01-20&tag=pfamazon01-20)

I will appreciate any advice on how to continue in this situation.
 
Last edited by a moderator:

Answers and Replies

  • #2
Orodruin
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
16,817
6,626
Before, I was thinking maybe I could just give the domain (i.e. from 0 to 100 with interval 1) and then just let Mathematica do it, but I was wrong since Mathematica should calculate the value of Y for a certain X for one round then input another point then run again, etc.
With Mathematica's Plot command you need only specify the function to plot, the variable, and the variable's range. Mathematica will do the rest.

Plot[C X, {X,0,100}]

Of course, C will need to have a value for this to work.
 
  • #3
222
9
With Mathematica's Plot command you need only specify the function to plot, the variable, and the variable's range. Mathematica will do the rest.

Plot[C X, {X,0,100}]

Of course, C will need to have a value for this to work.
Is the plot command also used by researchers when doing their theoretical simulation (assuming mathematica can)? Is it really that easy now? I thought it was a very tedious work.
 
Last edited by a moderator:
  • #4
ChrisVer
Gold Member
3,337
440
A simple plot should not need tedious work to be plotted, because nobody wants to waste essential time of their work trying to figure out how plotting a function works... it's not the tedious part of their work...
 
Last edited:

Related Threads on Numerical Simulations

Replies
58
Views
4K
Replies
1
Views
917
Replies
0
Views
2K
Replies
8
Views
2K
Replies
1
Views
4K
Replies
6
Views
10K
Replies
3
Views
2K
Replies
1
Views
2K
Replies
4
Views
2K
Replies
5
Views
2K
Top