how to represent a base number
古いコメントを表示
please tell how to represent xi-1^2. i.e not xi-(2). i want x(i-2)
1 件のコメント
It is not clear what you want, because you have written two different things. No matter how many times your exponentiate 1 (e.g. your example 1^2) the output will never equal 2.
MATLAB does not have implicit multiplication, so you need to use a * sign.
回答 (1 件)
Stephen23
2016 年 2 月 25 日
Do you want this:?
>> x = 3;
>> x*(1i-2)
ans = -6 + 3i
2 件のコメント
praveena maddamsetty
2016 年 2 月 25 日
N = 6;
M = 987654321;
X = 123456789
for k = 1:N;
X = mod(X^2,M)
end
displays this in the command window:
X = 123456789
X = 478395062
X = 281394656
X = 325603120
X = 147470912
X = 750037428
カテゴリ
ヘルプ センター および File Exchange で App Building についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!