Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Selecting steam table data using relational operators. The first column of matrix steam Table indicates the temperature of water in Celsius. The remaining colums indicate

image text in transcribed
image text in transcribed
image text in transcribed
Selecting steam table data using relational operators. The first column of matrix steam Table indicates the temperature of water in Celsius. The remaining colums indicate the thermodynamic properties of water at the specified temperature. Assion selected with all rows of steam Table that correspond to temperatures greater than lo Temp and less than hiTomo Ex: If loTomp 54 and NiTemp is 84, thon selectedData is 155,0 1576 0563,2450.1, 80,0.1904,7 071,2466.0.1 Function Save Reset MATLAB Documentation 1 function selectedDataGetsteanTableData Loteng hing) 2 SelectLogical Return rows of the team table data between input % low and high temperatures 45 Inputs lotemp, hitempaput low and high temperatures for X Indexing out of a table DX Outputs selectedData returned rows of tear table data between low and high temperatures steanTablet Wirit column Temperature (Celsius) ateanTable - E 50, 0.1335, 12.032, 24435 11 Logically indexing a specified number of elements. Specific entries in a two dimensional array dataMatrix are identified by a logical index array logicalSelect. Assign the first numSelected of the selected elements to an array selectedData Ex #cotaMatrix is [2, 3, 6,5,78 440,-3.63), logicalSelectis [ 1.0.0.0.0.1.1.1.11 and numSelected is 4, then selected Data is 1-2 9: 3:44) Function Saye e Reset DI MATLAB Documentation function selectedoata - SelectLogical dataMatrix, logicalSelect, nunselected > > SelectLogical Return the first nunSelected values of input 20 Xarray datalatrix Indexed by localSelect indexing array 4 Inputs: dataratrix input data matrix (20 array) X logicalSelect - logical Indexing array can be 2 or near 0 % numSelected number of indexed elements to return in selected at Outputs selectedoata-column vector of logically indeed elements to return Assign temp Selected with locally indexed elements of data atrix templected data atrix 12 No Negatives Write a function called genMatNone that takes any of integes called in Mat and creates an imuput array that replaces all the negative numbers in in Mat with zero. Restrictions. Logic indexing should be used. Loops should not be used EX in Mata 4 5 3 5 2 1, 52 semates Inat) produces buthat 5 0 1 5 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago