Info

This question is closed. Reopen it to edit or answer.

I have equation having variable A(i) and B(j) where i and j where i varies from 1 to 5 and j varies from 1 to 3. How can I plot this equation by using one value of let say j against all values of i and same for other values of j ?

1 view (last 30 days)
x = 2^A(i)-2^B(j);

Answers (1)

jonas
jonas on 2 Jun 2018
Edited: jonas on 2 Jun 2018
[A,B]=meshgrid(1:5,1:3)
x=2.^A-2.^B
plot either as a surface,
surf(A,B,x)
or in 2D,
plot(x)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!