multiplication table in matlab
Afficher commentaires plus anciens
I want to make the multiplication table using matlab ?
2 commentaires
Azzi Abdelmalek
le 1 Mar 2013
What does that mean?
leela krishna
le 30 Juin 2019
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
Réponse acceptée
Plus de réponses (4)
John Doe
le 22 Mai 2013
Another one-liner:
cumsum(meshgrid(1:10))
Teja Muppirala
le 23 Mai 2013
N = 10
(1:N)'*(1:N)
2 commentaires
Morganne Durham
le 22 Jan 2018
To make a matrix for a times table, you need to use a period before the *
(1:N)'.*(1:N)
Matt J
le 1 Mar 2013
As an example, This will generate a times table for integers 1...10
bsxfun(@times, (1:10).',1:10)
Akmal
le 19 Juin 2022
0 votes
...
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!