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!