
To create:
The

Answer to Problem 13.2P
Solution:
The script file is,
matrix = zeros(2, 2, 3);
%define the 3*3 true color matrix.
matrix(1, 1, 3) = 255;
matrix(1, 3, 3) = 255;
matrix(1, 2, 3) = 255;
matrix(2, 1, 3) = 255;
matrix(3, 3, 3) = 255;
matrix(2, 2, 3) = 255;
matrix(2, 2, 3) = 255;
matrix(3, 1, 3) = 255;
matrix(3, 2, 3) = 255;
matrix(2, 3, 1) = 255;
matrix = uint8(matrix);
image(matrix);
%create an image of a 3*3 true color matrix.
Explanation of Solution
A true color matrix is created of the order of
MATLAB Code:
matrix = zeros(2, 2, 3);
%define the 3*3 true color matrix.
matrix(1, 1, 3) = 255;
matrix(1, 3, 3) = 255;
matrix(1, 2, 3) = 255;
matrix(2, 1, 3) = 255;
matrix(3, 3, 3) = 255;
matrix(2, 2, 3) = 255;
matrix(2, 2, 3) = 255;
matrix(3, 1, 3) = 255;
matrix(3, 2, 3) = 255;
matrix(2, 3, 1) = 255;
matrix = uint8(matrix);
image(matrix);
%create an image of a 3*3 true color matrix.
Save the MATLAB files with name, chapter13_54793_13_2P.m in the current folder. Execute the file by typing the name at the command window to generate output.
Result:
The figure window is,
Therefore, the result is stated above.
Want to see more full solutions like this?
Chapter 13 Solutions
MATLAB: A Practical Introduction to Programming and Problem Solving
- 3.) The lengths (in kilometers) of a random sample of rivers on the South Island of New Zealand that flow to the Tasman Sea are listed in table #3.1.9 (Lee, 1994). Find the mean, median, and mode. Table #3.1.9: Lengths of Rivers (km) Flowing to Tasman Sea River Length (km) River Length (km) Hollyford 76 Waimea 48 Cascade 64 Motueka 108 Arawhata 68 Takaka 72 Haast 64 Aorere 72 Karangarua 37 Heaphy 35 Cook 32 Karamea 80 Waiho 32 Mokihinui 56 Whataroa 51 Buller 177 Wanganui Waitaha Hokitika 56 Grey 121 40 Taramakau 80 64 Arahura 56arrow_forward2.) The lengths (in kilometers) of a random sample of rivers on the South Island of New Zealand that flow to the Pacific Ocean are listed in table #3.1.8 (Lee, 1994). Find the mean, median, and mode. Table #3.1.8: Lengths of Rivers (km) Flowing to Pacific Ocean River Length River Length (km) (km) Clarence 209 Clutha 322 Conway 48 Taieri 288 Waiau 169 Shag 72 Hurunui 138 Kakanui 64 Waipara 64 Rangitata 121 Ashley 97 Ophi 80 Waimakariri 161 Pareora 56 Selwyn 95 Waihao 64 Rakaia 145 Waitaki 209 Ashburton 90arrow_forwardSection 3.1: Homework 1.) Cholesterol levels (mg/dL) were collected from a random sample of patients two days after they had a heart attack (Ryan, Joiner & Ryan, Jr, 1985) and are in table #3.1.7. Find the mean, median, and mode. Table #3.1.7: Cholesterol Levels 270 236 210 142 280 272 160 220 226 242 186 266 206 318 294 282 234 224 276 282 360 310 280 278 288 288 244 236arrow_forward
- > Next question Get a similar question You can retry this question below am Proctor ) ements ns sources esources Quick note for Excel users: Excel analyzes using first variable minus second variable. If need help, watch the video at the bottom. Testing a claim about a population mean: t-Test An overly involved "neighborhood watch" group has been investigating the length of lawns. In years past, lawns had been mowed to a mean length of 2.8 inches. A recent random sample of lawn lengths is given below. Conduct an appropriate test, at a 5% significance level, to determine if the overall mean lawn length is now higher than 2.8 inches. Data (lawn lengths, measured in inches): 3.32 3.30 3.70 2.02 4.63 3.68 3.78 3.49 3.91 3.29 2.19 3.95 3.31 3.68 4.40 3.81 4.39 4.31 Checksum: 65.16 Click Download CSV to download csv file of data or copy/paste the data into Excel. After downloading the file, you may want to save it as an Excel Workbook. A. Consider the parameter of interest and choose the…arrow_forwardext question Get a similar question You can retry this question below Proctor nts Quick note for Excel users: Excel analyzes using first variable minus second variable. If need help, watch the video at the bottom. Testing a claim about a population mean: t-Test An overly involved "neighborhood watch" group has been investigating the length of lawns. In years past, lawns had been mowed to a mean length of 2.8 inches. A recent random sample of lawn lengths is given below. Conduct an appropriate test, at a 5% significance level, to determine if the overall mean lawn length is now higher than 2.8 inches. Data (lawn lengths, measured in inches): 3.32 3.30 3.70 2.02 4.63 3.68 3.78 3.49 3.91 3.29 2.19 3.95 3.31 3.68 4.40 4.39 4.31 3.81 rces urces Checksum: 65.16 Click Download CSV to download csv file of data or copy/paste the data into Excel. After downloading the file, you may want to save it as an Excel Workbook. A. Consider the parameter of interest and choose the correct alternative…arrow_forwardWhat is the detailed explaination of the solution and answer?arrow_forward
- College Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning
- Algebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageAlgebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningElementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage Learning




