I need help with this MATLAB question
1 次查看(过去 30 天)
显示 更早的评论
For this, you will write Matlab program that will do the following:
- Use a pop-up dialog to query the user for the name of a text file.
- Read a matrix of numbers from the file into your program. This data will be arranged so that each column corresponds to a "subject", and each row to some experimental "data" about that subject taken over multiple days.
- Print out the raw data to the console.
- Make a plot containing two subplots(one above the other in a single figure window):
-Subplot 1: plot the raw data for each user against time in a single plot.
- Subplot 2: plot the mean and standard deviation over all users against time
- Label the axes on all plots(including the plots below)
- Using for loops, remove all negative data(specifically, set any negative data to zero)
- Print out the altered data to the console
- Make a second plot with the same description as the first using the modified data.
- Confirm with the user using a pop-up dialog before closing all figures.
You must follow the requirements below to make automated grading possible:
- Use the provided Matlab functions get_infilename() and load_if_possible(), and call confirm_dialog() before closing your figures.
- Use disp() to show raw data (where it says "print out the data to the console").
- First plot must be figure(1)
- Second plot must be figure(2).
- Use Matlab's default fonts, colors,linestyles, and all other plot properties.
- Do not use call any other Matlab functions that create dialogs or in any other way prompt the user for input(for example: dialog, pause,listdlg).
5 个评论
回答(1 个)
Matt J
2019-10-8
I know how to get user input but how do i get it through a pop up box?
One option is inputdlg,
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!