1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kirill115 [55]
3 years ago
14

Given an input array of strings (characters) s, pick out the second column of data and convert it into a column vector of data.

Missing data will be indicated by the number 9999. If you encounter missing data, you should set it to the average of the immediately neighboring values. (This is a bit simpler than using `interp1`.)
If the input array is s = [ 'A' '0096' ; 'B' '0114' ; 'C' '9999' ; 'D' '0105' ; 'E' '0112' ]; then the output variable `t` is the following column vector. t = [96 114 109.5 105 112]';
Compose a function read_and_interp which accepts an array in the above format and returns the data converted as specified. You may find the conversion function `str2num` to be useful.
(Using MATLAB Syntax only)
Computers and Technology
1 answer:
hodyreva [135]3 years ago
7 0

Answer:

Consider the following code.

Explanation:

save the following code in read_and_interp.m

 

function X = read_and_interp(s)

[m, n] = size(s);

X = zeros(m, 1);

for i = 1:m

if(str2num(s(i, 2:5)) == 9999)

% compute value based on previous and next entries in s array

% s(i, 2:5) retrieves columns 2-5 in ith row

X(i,1) = (str2num(s(i-1 ,2:5)) + str2num(s(i+1,2:5)))/2;

else

X(i,1) = str2num(s(i,2:5));

end

end

end

======================

Now you can use teh function as shown below

s = [ 'A' '0096' ; 'B' '0114' ; 'C' '9999' ; 'D' '0105' ; 'E' '0112' ];

read_and_interp(s)

output

ans =

96.000

114.000

109.500

105.000

112.000

You might be interested in
On many advanced routers and switches, you can implement QoS through bandwidth management, such as __________, where you control
Mila [183]

Answer:

c. traffic shaping

Explanation:

A traffic shaping system is one that allows to adapt the incoming data traffic that comes from some node of the network giving it a special treatment called conformation of accepted traffic and thus allowing the frames to be forwarded through the network of data under traffic rules without having gone through some traffic shaping method, this can be detected as non-conforming traffic at the edge of access to the discarded metropolitan network.

Traffic shaping is a mechanism that alters the traffic characteristics of the cell flow of a connection to achieve better network efficiency while maintaining QoS objectives or in order to ensure that the cell flow conforms to traffic parameters according to the leaky bucket algorithm configuration of the traffic contract. Traffic shaping can be used in ATM, for example, to reduce peak speed, limit the length of the burst by means of adequate spacing of cells over time. The use and location of this function is network specific.

5 0
3 years ago
Bertha was recording a drama club practice. during editing, she noticed that she missed recording the beginning of a shot in the
Ray Of Light [21]

Bertha should use end roll technique so that she doesn't miss the initial action of a drama.

b. end roll

<u>Explanation:</u>

End roll is a simple method to decide whether the film is pushing ahead or not. When you utilize the film advance to wind the film, you essentially need to check if the handle on the left (that you use to rewind the film) is turning.

In the event that it turns, great, it implies that the film is appropriately locked in. So Bertha should utilize the end move strategy with the goal that she doesn't miss the underlying activity of a dramatization.

5 0
3 years ago
When does technology become assistive technology?
deff fn [24]
Technology becomes assistive technology C. WHEN SOMEONE WITH A DISABILITY OR LIMITATION USES IT TO HELP HIM OR HER DO SOMETHING.

Assistive technology is defined as any technological item, equipment, software or product system that is used to assist individuals with disabilities to increase, improve, and maintain their functional capabilities.
6 0
3 years ago
Read 2 more answers
Decomposition is
Allushta [10]

Answer:

breaking a problem into smaller parts

Explanation:

In language of computer science, decomposition is the process in which complex problems are divided into simpler parts. These simpler parts helps in the solving of the complex problems. They are made easier and comprehensible for the user to understand. Each simple part is further analyzed separately and the solution of the complex issues are derived.  The process becomes lengthy but the solution is found.

8 0
3 years ago
Gwen wants to adjust columns of text that contain money values. Which tab stop option should she choose?
Shtirlitz [24]

Gwen wants to adjust columns of text that contain money values. The tab in excel in the stop option that should she choose is: "The decimal Tab" (Option C)

<h3>

What is the Decimal Tab?</h3>

A Decimal Tab stop is used to align numbers around a decimal point. The decimal point remains in the same location regardless of the amount of digits.

When using this form of tab stop, the numbers must be aligned around a decimal character.

Learn more about excel:
brainly.com/question/25879801
#SPJ1

3 0
10 months ago
Other questions:
  • The benefits of flextime include:
    11·2 answers
  • How do you change the text style on brainly mobile ?
    12·1 answer
  • PowerPoint provides a wide variety of predefined shapes that can add visual insert to a slide true or false
    10·2 answers
  • What are the factors affecting the purchasing decision for dbms software?
    7·2 answers
  • Calculate the performance of a processor taking into account stalls due to data cache and instruction cache misses. The data cac
    11·1 answer
  • Write a class "Dog" with a private int field called months and two public member functions setAge and GetStage. setAge takes as
    13·1 answer
  • <img src="https://tex.z-dn.net/?f=%20%5Cfrac%7Bx%7D%7B1%20%2B%20x%7D%20%20%2B%20%20%5Cfrac%7Bx%20%2B%201%7D%7Bx%7D%20%20%3D%20%2
    15·2 answers
  • In which generation microprocessor was developed short answer of computer science​
    7·1 answer
  • What is software? Why is it needed?​
    6·1 answer
  • _______ is a medium-range wireless network. ________ is a medium-range wireless network. Cellular radio LTE UWB Wi-Fi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!