Display negative numbers - MATLAB Cody - MATLAB Central

Problem 43045. Display negative numbers

Difficulty:Rate

Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

Solution Stats

79.41% Correct | 20.59% Incorrect
Last Solution submitted on Dec 06, 2024

Problem Comments

Solution Comments

Show comments
Join Cody Contest 2025 — Have Fun and Win Prizes!
...
We’re excited to invite you to Cody Contest 2025! 🎉 Pick a team,...

Problem Recent Solvers105

Suggested Problems

More from this Author8

Community Treasure Hunt

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

Start Hunting!