1 %Given variables to be used in your code below 2 % After running the load command, your code will be able to use the 3 % variables cal, ca2, ca3, ca4, ca5, filename 4 load('HWBs_cellArrays.mat') 5 6% Create a cell array (A) with length 4 where: 7% the first cell contains the vector [true false false], 8% the second cell contains the string 'Georgia Tech' 9% the third cell contains the number 1371 10% and the fourth cell ****contains another cell**** with the vector [6 29 93] 11 12 A = []; 13 14 % Given cal which is a 1xN cell array, create a cell array that contains the 2nd and 4th cells of cal (B) 15 B = []; 16 17% Given ca2 which is a 1xN cell array, delete the entire 3rd cell of ca2. Meaning that if ca2 was originally 18 % length 4, it should now become length 3 because the entire 3rd cell is 19 % deleted. Save the resulting cell array in C. Might need more than 1 line of code. 20 21 C = []; 22 23 24 % Given ca3 which is a 1xN cell array of all strings, create a mask that is true 25% where the contents of the cell is the word 'Test1'. You should use the strcmp function. (D) 26 27 D = []; 28 29% Given ca4 which is a 1xN cell array of doubles, create a mask that is true 38 % where the contents of the cell are greater than 4. You will need to use the cell2mat function (E) 31 32 € = []; 33 34% Given your mask in E, change the cells in ca4 that have a value greater than 4 to the number 8. 35 % Save the resulting cell array in F. Might need multiple lines of code. 36 37 F = [] 38 39 % Given cas which is an MXN cell array, index the entire last row as a cell and save it in G (G should end up as a cell array) 40 41 G = [] 42 43 % Given a variable named filename that contains the name of an excel file, open the excel file as 44% a cell array. You should use the readcell function (H) 45 46 H = [] 47 AB

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
1 %Given variables to be used in your code below
2 % After running the load command, your code will be able to use the
3 % variables cal, ca2, ca3, ca4, ca5, filename
4
load('HW08_cellArrays.mat')
5
6 % Create a cell array (A) with length 4 where:
7% the first cell contains the vector [true false false],
8% the second cell contains the string 'Georgia Tech"
9% the third cell contains the number 1371
10 % and the fourth cell ****contains another cell**** with the vector [6 29 93]
11
12 A = [];
13
14 % Given cal which is a 1xN cell array, create a cell array that contains the 2nd and 4th cells of cal (B)
15 B = [];
16
17 % Given ca2 which is a 1xN cell array, delete the entire 3rd cell of ca2. Meaning that if ca2 was originally
18 % length 4, it should now become length 3 because the entire 3rd cell is
19 % deleted. Save the resulting cell array in C. Might need more than 1 line of code.
20
21 C = [];
22
23
24% Given ca3 which is a 1xN cell array of all strings, create a mask that is true
25 % where the contents of the cell is the word 'Test1'. You should use the strcmp function. (D)
26
27 D = [];
29 % Given ca4 which is a 1xN cell array of doubles, create a mask that is true
30 % where the contents of the cell are greater than 4. You will need to use the cell2mat function (E)
31
32 E = [];
33
34 % Given your mask in E, change the cells in ca4 that have a value greater than 4 to the number 0.
35 % Save the resulting cell array in F. Might need multiple lines of code.
36
37 F = []
38
39 % Given cas which is an MXN cell array, index the entire last row as a cell and save it in G (G should end up as a cell array)
40
41 G = []
42
43 % Given a variable named filename that contains the name of an excel file, open the excel file as
44 % a cell array. You should use the readcell function (H)
46 H = []
47
48
Transcribed Image Text:1 %Given variables to be used in your code below 2 % After running the load command, your code will be able to use the 3 % variables cal, ca2, ca3, ca4, ca5, filename 4 load('HW08_cellArrays.mat') 5 6 % Create a cell array (A) with length 4 where: 7% the first cell contains the vector [true false false], 8% the second cell contains the string 'Georgia Tech" 9% the third cell contains the number 1371 10 % and the fourth cell ****contains another cell**** with the vector [6 29 93] 11 12 A = []; 13 14 % Given cal which is a 1xN cell array, create a cell array that contains the 2nd and 4th cells of cal (B) 15 B = []; 16 17 % Given ca2 which is a 1xN cell array, delete the entire 3rd cell of ca2. Meaning that if ca2 was originally 18 % length 4, it should now become length 3 because the entire 3rd cell is 19 % deleted. Save the resulting cell array in C. Might need more than 1 line of code. 20 21 C = []; 22 23 24% Given ca3 which is a 1xN cell array of all strings, create a mask that is true 25 % where the contents of the cell is the word 'Test1'. You should use the strcmp function. (D) 26 27 D = []; 29 % Given ca4 which is a 1xN cell array of doubles, create a mask that is true 30 % where the contents of the cell are greater than 4. You will need to use the cell2mat function (E) 31 32 E = []; 33 34 % Given your mask in E, change the cells in ca4 that have a value greater than 4 to the number 0. 35 % Save the resulting cell array in F. Might need multiple lines of code. 36 37 F = [] 38 39 % Given cas which is an MXN cell array, index the entire last row as a cell and save it in G (G should end up as a cell array) 40 41 G = [] 42 43 % Given a variable named filename that contains the name of an excel file, open the excel file as 44 % a cell array. You should use the readcell function (H) 46 H = [] 47 48
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education