writing a skript on matlab

2 ビュー (過去 30 日間)
Ozan Mirzanli
Ozan Mirzanli 2020 年 4 月 9 日
回答済み: Vinai Datta Thatiparthi 2020 年 4 月 12 日
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
Image Analyst 2020 年 4 月 9 日
Sounds like homework. Click this link

サインインしてコメントする。

回答 (1 件)

Vinai Datta Thatiparthi
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!

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by