Mathlab loops questıons about new starters
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mert Can Sökmen
el 29 de Mzo. de 2021
Comentada: Rik
el 29 de Mzo. de 2021
Write a program which asks the user to enter their name and N and integer, and displays that name N times. See the help of input to read strings.
Run 1:
Enter name: Matlab
Enter N: 3
Matlab
Matlab
Matlab
1 comentario
Rik
el 29 de Mzo. de 2021
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).
Respuesta aceptada
Riley
el 29 de Mzo. de 2021
clear
clc
str = input('Enter name:','s') ;
N = input('Enter N:') ;
for i=1:N
disp(str);
end
Try this. But as a starter, you'd better utilize the HELP and get started by your self. You'll find it not that hard.
5 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!