Question: Problems 13 and 14 please File Ecit Bonk Windw Help brrBack Fon-ardMake Hihligh Make Nor ment Hichlghes Icomln 2ot com to Fi Hand Tool Stat

Problems 13 and 14 please

Problems 13 and 14 please File Ecit Bonk Windw Help brrBack Fon-ardMake

File Ecit Bonk Windw Help brrBack Fon-ardMake Hihligh Make Nor ment Hichlghes Icomln 2ot com to Fi Hand Tool Stat Readnq top Reing Hid:N tion Pae Luyout Josephus(10, 2)should return 5 Contents b. Extend the function to return an NxN array M of ones and zeros, representing alive and dead, encoding the history turn by turn. The first row of M should be all ones, the last row has a single one in the jth column. The syntax should be [j, M]-Josephus (N, k). Write a program that calls the function to get M and devise a graphical display of the deadly history 13. Clipping a vector. Write a function vout-clipVec(v, vmin, vmax) that copies the input vector v to the output vector vout, except if a value is greater than vmax or less than vmin. Values greater than vmax are set to vmax and values less than vmin are set to vmin Check by running this test, which should plot a sine wave clipped level at the tops and bottoms. x-linspace (0, 3, 300); y-sin (2*pi*x) ; plot(x,clipvec(y, -0.9, axis([O, 3, -1, 1]); 0.9)); 14. Swap. Write a function that returns the values of the two inputs in reversed order: function [a,b]=swap (x, y). To use it to swap the values of two variables simply write [v1,v2]=swap (v1,v2) 15. Check if sorted. lype here to search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!