Info

この質問は閉じられています。 編集または回答するには再度開いてください。

help for project please

1 回表示 (過去 30 日間)
ghaddar karim
ghaddar karim 2020 年 5 月 4 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
hello guys, i'm new to matlab and i want to know how to create a Vector that gives a 1 for values between 1 and 10 and 0 otherwise, thank you in advance

回答 (1 件)

David Hill
David Hill 2020 年 5 月 4 日
y=(x>=1&x<=10);%will provide logical vector where x is your input vector
  2 件のコメント
ghaddar karim
ghaddar karim 2020 年 5 月 4 日
but how can i specify the values of x because i don't have a given that tell me in which range it is
and thank you for the help
David Hill
David Hill 2020 年 5 月 4 日
What is your input? You could create an input vector.
x=randi(50,1,1000);

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by