Info

This question is closed. Reopen it to edit or answer.

Using loops to solve probles please assist

1 view (last 30 days)
Vhugala  Raphunga
Vhugala Raphunga on 29 Mar 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
Write a program (using loops) that doubles all the elements of x that are positive, and adds 10 to all the elements that are negative. x = [2 -5 6 7 -4 8 -5 6];
  1 Comment
Ameer Hamza
Ameer Hamza on 29 Mar 2020
It seems like a homework question. What have you tried already?

Answers (1)

Cris LaPierre
Cris LaPierre on 29 Mar 2020
I recommend going through Chapter 13 of MATLAB Onramp. It takes about 10 minutes, and will help you learn how to use for loops.

Community Treasure Hunt

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

Start Hunting!