Help with For end loop

15 ビュー (過去 30 日間)
LUAN NGUYEN
LUAN NGUYEN 2018 年 10 月 12 日
コメント済み: Image Analyst 2018 年 10 月 12 日
Write a script prompting the users to input an arbitrary vector x ([x1,x2,x3,....,xn]). Using conditional statment and loops, create two vectors P and N. P contains the zero and positive elements of x , and the vector N cointain the negative elements of x. In both P and N, the elements should appear in the same order as x. Use fprintf to display the P and N vectors to the users.
  1 件のコメント
Image Analyst
Image Analyst 2018 年 10 月 12 日

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by