making a exponential from a for loop

11 views (last 30 days)
Sebastian Sunny
Sebastian Sunny on 9 Dec 2021
Commented: Rik on 10 Dec 2021
Hi im trying to make 2 expontentials go from 1 - 10 as the exponential and 1- 8, might make better sense with the code;
for n = 1:10
k = 6*10^n;
for i = 1:8
Cd = 1.5*10^i;
end
end
  3 Comments

Sign in to comment.

Accepted Answer

David Hill
David Hill on 9 Dec 2021
k=6*10.^(1:10);
Cd=1.5*10.^(1:8);

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!