photo

Sam Sims


2017년부터 활동

Followers: 0   Following: 0

통계

MATLAB Answers

3 질문
0 답변

순위
150,070
of 300,871

평판
0

참여
3 질문
0 답변

답변 채택
0.0%

획득한 표
0

순위
 of 21,100

평판
N/A

평균 평점
0.00

참여
0 파일

다운로드 수
0

ALL TIME 다운로드 수
0

순위

of 171,460

참여
0 문제
0 답안

점수
0

배지 수
0

참여
0 게시물

참여
0 공개 채널

평균 평점

참여
0 하이라이트

평균 좋아요 수

Feeds

보기 기준

질문


I am currently trying to write a code that spits out all the prime numbers less than an input, n, that also have a difference of 2. So, 3 and 5, 5 and 7, and 17 and 19 and I also need to put them into a 2 column matrix. This is what I have so far.
tableName = zeros(1,2); n = input('Integer'); a = primes(n) I get a vector of all the prime numbers less than or equa...

8년 초과 전 | 답변 수: 1 | 0

1

답변

질문


I am trying to build this code to where I can type either YES or NO when asked for the input in line 1, but whenever I type NO, an error pops up saying "Matrix dimensions must agree". I am not sure where I am going wrong.
tail_stinger = input('Has a tail/stinger?','s'); if tail_stinger == 'YES' straight_tail = input('Tail straight like a nee...

8년 초과 전 | 답변 수: 1 | 0

1

답변