I need help with this MATLAB question

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

Matt J
Matt J 2019년 10월 8일
OK. What have you done, and where are you stuck?
Mia
Mia 2019년 10월 8일
I am stuck with making subplots.
Mia
Mia 2019년 10월 8일
Thank you!!
Also, I know how to get user input but how do i get it through a pop up box?
Ankit
Ankit 2019년 10월 8일
hows your confirm_dialog() function looks like?

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2019년 10월 8일

1 개 추천

I know how to get user input but how do i get it through a pop up box?
One option is inputdlg,

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

질문:

Mia
2019년 10월 8일

댓글:

2019년 10월 8일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by