Reputation: 857
I'd like to plot the following function in Wolfram Alpha (n is a positive integer variable):
f = n * (2^(-n) - 1)
In Matlab the corresponding function is stem
How can I specify that n is a positive integer variable?
Thank you for your time.
Upvotes: 3
Views: 2114
Reputation: 5166
You can use discrete plot:
discrete plot f = n * (2^(-n) - 1) for 0 < n <= 10
Upvotes: 2
Reputation: 1855
You can append a plot
keyword at the beginning of your function. So, in your case, it would be something like this
plot f = n * (2^(-n) - 1) with n > 0
which will give the following result
Upvotes: -1