Answered step by step
Verified Expert Solution
Question
1 Approved Answer
note: change strings(characters)s into characters Given an input array of strings (characters) s, pick out the second column of data and convert it into a
note: change "strings(characters)s" into "characters"
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. 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 usefulStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started