multiplication table in matlab
古いコメントを表示
I want to make the multiplication table using matlab ?
2 件のコメント
Azzi Abdelmalek
2013 年 3 月 1 日
What does that mean?
leela krishna
2019 年 6 月 30 日
the output is the multiplication table of any number
clc;
clear all;
n=input('Enter an integer:');
i=1;
while(i<=10)
fprintf('%d*%d=%d \n',n,i,n*i);
i=i+1;
end
採用された回答
その他の回答 (4 件)
John Doe
2013 年 5 月 22 日
Another one-liner:
cumsum(meshgrid(1:10))
Teja Muppirala
2013 年 5 月 23 日
N = 10
(1:N)'*(1:N)
2 件のコメント
Morganne Durham
2018 年 1 月 22 日
To make a matrix for a times table, you need to use a period before the *
(1:N)'.*(1:N)
Matt J
2013 年 3 月 1 日
As an example, This will generate a times table for integers 1...10
bsxfun(@times, (1:10).',1:10)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!