Plotting Equation A with SCILAB: Software and Tips for Summation in Graphs

  • Thread starter sciencecrazy
  • Start date
  • Tags
    Plot
In summary, the conversation discusses the plotting of a complex equation involving summations and variables. The desired output is a graph showing the relationship between the variables. A suggested code in Mathematica is provided, and the use of SCILAB is also mentioned as an alternative. The conversation ends with the simplification of the equation for n>=3.
  • #1
sciencecrazy
5
0
please help me plot this equation!

A = (2n-2 +2n-3+ {n-4i=0 [(-1) n-1-i ]*[2i] } )*B/(2n-2n-1- 2n-2-{n-3i=0 [((-1)n-i ) *2i]})

maybe taking b along x axis, n along y-axis and a along z axis.
Please post few software or utility name to help me out. But it would be equally useful if someone gives the plotted graph itself.

** if anyone of you around has SCILAB please post some code for plotting this function.
The basic problem i face is how am i supposed to add summation/sigma ?
 
Last edited:
Physics news on Phys.org
  • #2


Your notation is a little ambiguous. Here's what I think it is:

[tex]a[\text{n$\_$},\text{b$\_$}]\text{:=}\left(2^{n-2}+2^{n-3}+\left(\sum _{i=0}^{n-4} \left((-1)^{n-1-i}\right) 2^i\right) \right)\frac{b}{2^n-2^{n-1}-2^{n-3}-\sum _{i=0}^{n-3} \left(\left((-1)^{n-1} 2^i\right)\right)}[/tex]

No way you can hook-up with a machine running Mathematica? Try and find one:

a[n_, b_] := (2^(n - 2) + 2^(n - 3) + Sum[(-1)^(n - 1 - i)*2^i, {i, 0, n - 4}])*
(b/(2^n - 2^(n - 1) - 2^(n - 3) - Sum[(-1)^(n - 1)*2^i, {i, 0, n - 3}]))

mytable = Flatten[Table[{n, b, a[n, b]}, {n, 0, 10}, {b, 0, 5, 0.1}], 1];

ListPlot3D[mytable]

I'll leave it up to you to run the code if you wish.
 
Last edited:
  • #3


If n>=3 and I haven't made a mistake then Jackmell's result simplifies to

-((8*(-1)^(3*n)*b + 2^n*(-9 + (-1)^(2*n))*b)/(-24*(-1)^n + 3*2^n*(3 + 2*(-1)^n)))

Perhaps you can plot that in Scilab.
 

1. What is the purpose of plotting an equation?

Plotting an equation helps to visualize the relationship between two variables and understand how they change in relation to each other. It also allows for easier interpretation and analysis of the data.

2. How do I plot an equation?

To plot an equation, first choose a range of values for each variable and then substitute those values into the equation to find corresponding points. Plot these points on a graph and connect them to create a visual representation of the equation.

3. What is the importance of choosing the right scales for plotting an equation?

The scales on a graph determine the range and intervals of the variables being plotted. Choosing the right scales is important because it can affect the shape of the graph and the accuracy of the data being represented.

4. Can I plot any type of equation?

Yes, any equation with two variables can be plotted. However, some equations may result in more complex or unconventional graphs, so it is important to carefully choose the range of values to plot and adjust the scales accordingly.

5. How can I use a plotted equation to solve a problem?

By plotting an equation, you can visually see the relationship between the variables and make predictions or solve problems by looking at the graph. For example, you can find the value of one variable by knowing the value of the other variable on the graph.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
731
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
134
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
954
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
873
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top