What are you asking of us? For the homework link? here it is: http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers
Help with For end loop
15 次查看(过去 30 天)
显示 更早的评论
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!