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!