A vector is given by: V = [5; 17; 3; 8; 0; 1; 12; 15; 20; 6; 6; 4; 7; 16]. Write a program in the form of a script file, which doubles the positive elements that are divisible by 3 and / or by 5, and raises to the cube the negative elements greater than -5 ie: WI= 1/ 2*Vi if Vi>0 multiple of 3 and / or 5 2/ (Vi)^3 if Vi<0 greater than -5 3/ Vi otherwise
MATLAB: Can anyone help to creat this vector
homeworkmatrix arraymatrix manipulationvector
Related Question
- Shifting number to end of an array
- I want to code the following such that the negative values get saved in zerocoeff and then the negative values becomes zero . I have tried something but i m still getting an empty zerocoeff .
- Matlab loops/if statements help for a beginner
- In an assignment A(:) = B, the number of elements in A and B must be the same. Runge-Kutta solving PDE using Method of lines
Best Answer