필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Cauli Vilela Ferreira
Cauli Vilela Ferreira 2020년 6월 29일
댓글: Cauli Vilela Ferreira 2020년 6월 29일
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
  댓글 수: 1
Cauli Vilela Ferreira
Cauli Vilela Ferreira 2020년 6월 29일
very well done.
i did this, but your way is better
q = sqrt(2);
DiscStN = 20;
DiscSt.N = fix((20*[1,q,q^2,q^3,q^4,q^5,q^6,q^7]))

댓글을 달려면 로그인하십시오.

카테고리

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