필터 지우기
필터 지우기

Mathlab loops questıons about new starters

조회 수: 1 (최근 30일)
Mert Can Sökmen
Mert Can Sökmen 2021년 3월 29일
댓글: Rik 2021년 3월 29일
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
Rik
Rik 2021년 3월 29일
If you have trouble with Matlab basics you may consider doing the Onramp tutorial (which is provided for free by Mathworks).

댓글을 달려면 로그인하십시오.

채택된 답변

Riley
Riley 2021년 3월 29일
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
Mert Can Sökmen
Mert Can Sökmen 2021년 3월 29일
These are not my homework. Teacher shared some questıons about mıdterm and ı cant solve this 3 questıon.And he did not share answers. I am thinking this questıons will be in midterm this reason ı have to fınd answers.
Rik
Rik 2021년 3월 29일
Then it might be attempted academic fraud, instead of being lazy and posting a homework question.
Don't you think you will learn more if you actually try to learn from this question? You can find guidelines for posting homework on this forum here.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KSSV
KSSV 2021년 3월 29일
REad about the function input.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by