Function Name: myNum2Cell Inputs (1): 1. (double) a vector or an array Outputs (1): 1. (cell) a cell array version of the input Function Description: Given a double vector or array, convert it into a cell array. You may not use the num2cell function. Examples: >> out1 = myNum2 Cell(magic(3)) >> out1 = >> out2 = >> out2 = >> out3 = >> out3 = {8, 1,6; 3,5,7; 4,9,2} myNum2 Cell (1:2:10) {1,3,5,7,9} myNum2 Cell( [1; 2; 3;5]) {1; 2; 3; 5}

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 4PP: (Numerical) Write and test a function that returns the position of the largest and smallest values...
icon
Related questions
Question

ON MATLAB PLS

Function Name: myNum2Cell
Inputs (1):
1. (double) a vector or an array
Outputs (1):
1. (cell) a cell array version of the input
Function Description:
Given a double vector or array, convert it into a cell array. You may not use the num2cell function.
Examples:
>> out1 = myNum2 Cell(magic (3))
>> out1 = {8, 1,6;
3,5,7;
4,9,2}
>> out2 = myNum2Cell (1:2:10)
>> out2 = {1,3,5,7,9}
>> out3 =
>> out3 =
myNum2 Cell([1; 2; 3;5])
{1; 2; 3; 5}
Transcribed Image Text:Function Name: myNum2Cell Inputs (1): 1. (double) a vector or an array Outputs (1): 1. (cell) a cell array version of the input Function Description: Given a double vector or array, convert it into a cell array. You may not use the num2cell function. Examples: >> out1 = myNum2 Cell(magic (3)) >> out1 = {8, 1,6; 3,5,7; 4,9,2} >> out2 = myNum2Cell (1:2:10) >> out2 = {1,3,5,7,9} >> out3 = >> out3 = myNum2 Cell([1; 2; 3;5]) {1; 2; 3; 5}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr