Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

---------------Part 3----------- Write a program called Part_3.m.Part_3should be a stand-alone program in that it should not need Part 1 and Part 2 to work. In

---------------Part 3----------- Write a program called Part_3.m.Part_3should be a stand-alone program in that it should not need Part 1 and Part 2 to work. In your Master File, add a clear, clc, and close allin the section related to Part 3 before calling the Part_3program. The program should:

a)Open a file selection dialog box asking the user the select the file to filter (See uigetfilefunction and set the Filter Specification to find .txtfiles only).(5%)

b)Load the data from the file selected in a)and present their positionsin a figure.

c)Add a pauseto your program so the user can look at the data.d)Create dialog box that gathers user input for the lower and upper bound for both the Eastingand Northingcoordinates. The default being [300000 inf] for the Eastingand [0 inf] for the Northing (See inputdlg function). (5%)

e)Filter the data following the upper and lower bounds input by the userin d).(5%)

f)Plot the filtered data in a new figure.

g)Open a file selection dialog box to save the filtereddata. (See uiputfilefunction and set the default file name to Filtered_ + the unfiltered file name selected by the user in a).

h)Save the filtered data in the file selected in g).

---------------- Part 4---------- Ultimate Program:(20%)Part_3is a niceadvanced program and is very useful as a first attempt to check the filteringmethod. However, if there are more than 3 files to do, it will become a very tedious process. The real power of programing is its ability to automatize any processes. Just a few lines at the beginning of a program for a user to change is enough. Part_4should also be a stand-alone program. As for Part 3, add a clear, close alland clccommand at the beginning of section 4 in your Master program. In your Master Program, before calling for your Part_4 program, add the following lines:

%%Folder where the raw data are, remember to add any relative or absolute path to it

Data_Folder='Raw_Data';

%%Folder where to save the filtered data (same as previously for path) and prefix to add to the file names

Filtered_Data_Folder='Filtered_Data'; Prefix_2_files='Filtered_';

%%Filtering bound for Easting and Northing

Filt_Easting=[300000 inf]; Filt_Northing=[0 inf];

These lines are the simple lines the user can change.

Using these information, write aprogram Part_4which:

a)list all the .txtfiles in the Data_Folder;

b)loop to each of the data file to i.filter the data using the filtering bound information;

ii.plot the position of the filtered data on a same figure for all fileswith the legend related to the file name;

iii.save each of the data in the Filtered_Data_Folderusing the Prefix_2_files.

(Note: if the Filtered_Data_Folderdoes not exist, the program should create it)

Its a Matlab language, sry for not listing out the required language

image text in transcribed

Filt Easting [300000 inf]; FiltNorthing=[0 inf]; - These lines are the simple lines the user can change. Using these information, write a program Part 4 which: a) list all the xr files in the Data Folder b) loop to each of the data file to i. filter the data using the filtering bound information; ii. plot the position of the filtered data on a same figure for all files with the legend related to the file name; ii save each of the data in the Filtered Data Folder using the Prefix 2 files. Note: if the Filtered Data Folder does not exist, the program should create it) Filt Easting [300000 inf]; FiltNorthing=[0 inf]; - These lines are the simple lines the user can change. Using these information, write a program Part 4 which: a) list all the xr files in the Data Folder b) loop to each of the data file to i. filter the data using the filtering bound information; ii. plot the position of the filtered data on a same figure for all files with the legend related to the file name; ii save each of the data in the Filtered Data Folder using the Prefix 2 files. Note: if the Filtered Data Folder does not exist, the program should create it)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions