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

  • Thread starter Thread starter sciencecrazy
  • Start date Start date
  • Tags Tags
    Plot
AI Thread Summary
The discussion revolves around plotting a complex mathematical equation involving summations and powers of two. The equation is expressed in terms of variables A, B, and n, with suggestions for plotting B along the x-axis, n along the y-axis, and A along the z-axis. Participants seek software recommendations for graphing, specifically mentioning SCILAB and Mathematica. One user provides a Mathematica code snippet to calculate and plot the function, demonstrating how to handle summations in the equation. They also simplify the equation for cases where n is greater than or equal to 3, offering a more manageable form for plotting. The conversation emphasizes the need for clarity in notation and the importance of using appropriate tools for visualization.
sciencecrazy
Messages
5
Reaction score
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


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

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)}

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:


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.
 

Similar threads

Replies
4
Views
4K
Replies
2
Views
2K
Replies
2
Views
1K
Replies
7
Views
2K
Replies
1
Views
2K
Replies
10
Views
3K
Back
Top