geometric progression and multiply by a common variable, help me pls.

1 次查看(过去 30 天)
How could I generalize some numbers, for example (20, 20 * sqrt (2), 28.2 * squr (2) and so on) as a geometric progression and then multiply by a common variable and get all possible results, e.g. (20 * B), ((20 * sqrt (2)) * B), ((28.2 * squr (2)) * B)

回答(1 个)

John D'Errico
John D'Errico 2020-6-29
So, you want this?
B = 3;
C = B*20*sqrt(2).^(0:10)
C =
Columns 1 through 9
60 84.853 120 169.71 240 339.41 480 678.82 960
Columns 10 through 11
1357.6 1920

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by