writing a skript on matlab
이전 댓글 표시
Write a script to display all numbers between 0 and 100 as long as it is not divisible by 2 or not equal to 50.
댓글 수: 1
Image Analyst
2020년 4월 9일
Sounds like homework. Click this link
답변 (1개)
Vinai Datta Thatiparthi
2020년 4월 12일
in = 0:100; % Create an array of numbers from 0 to 100
out = in( (mod(in,2)~=0) & (in~=50)) % Out contains numbers that are not even & not 50
Here are some Documentation links to help you ramp-up on the basic array/matrix operations on MATLAB -
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!