(Use R) Suppose x is a vector. Write a code that return the position in x that are nonnegative i.e. if x = (-1, 0, 1, 2,-3), it should return 2, 3, 4.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter10: Sequences, Series, And Probability
Section10.5: The Binomial Theorem
Problem 18E
icon
Related questions
Question
(Use R) Suppose x is a vector. Write a code that return the position in x that are
nonnegative i.e. if x = (-1, 0, 1, 2,-3), it should return 2, 3, 4.
Transcribed Image Text:(Use R) Suppose x is a vector. Write a code that return the position in x that are nonnegative i.e. if x = (-1, 0, 1, 2,-3), it should return 2, 3, 4.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Elementary Linear Algebra (MindTap Course List)
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:
9781305658004
Author:
Ron Larson
Publisher:
Cengage Learning
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell