writing a skript on matlab
Show older comments
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 Comment
Image Analyst
on 9 Apr 2020
Sounds like homework. Click this link
Answers (1)
Vinai Datta Thatiparthi
on 12 Apr 2020
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!
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!