Project 1: MATLAB Numerical Investigation

Use MATLAB to explore, fit, check, and communicate a group-specific building-energy dataset.
NoteSubmission format

Submit a PDF report, MATLAB source files, and the required results CSV. No Quarto or HTML document is required.

Purpose

Project 1 brings together the MATLAB portion of the course. Each team analyzes data for a different synthetic building and investigates the relationship between outdoor temperature and daily heating-energy consumption.

The problem is realistic, but the data are generated for this course. Different teams will obtain different coefficients, prediction errors, and conclusions.

Files Provided

Each team receives files following this pattern:

group-01-matlab-data.csv
project1-starter.m
model_rmse_starter.m
project1-report-template.docx
data-dictionary.pdf

The starter files contain the required structure, comments, filenames, and partially completed code. Students complete specified sections rather than starting from an empty program.

Required MATLAB Work

1. Import and inspect the data

  • Import the assigned CSV file.
  • Identify the number of rows and variables.
  • Check ranges, missing values, and unexpected values.
  • Use logical indexing to examine colder days, warmer days, or another assigned condition.

2. Write and test a function

Complete a small MATLAB function that calculates a required quantity, such as root-mean-square error. Test the function on a simple example whose answer can be checked by hand, and confirm that it works on vector input.

3. Visualize the relationship

Create clearly labeled figures showing:

  • heating energy over time or observation order;
  • heating energy against outdoor temperature;
  • residuals from a fitted relationship.

Use titles, axis labels with units, legends when necessary, and readable plot styles.

4. Fit and compare models

Fit at least two simple curves using the methods taught in the MATLAB block. For example, compare a linear fit with a quadratic fit.

For each fit:

  • report the coefficients;
  • calculate fitted values and residuals;
  • calculate an error measure;
  • identify unusual observations;
  • explain whether additional complexity materially improves the result.

5. Make and check a prediction

Use the selected fit to calculate a prediction at an assigned temperature. Check that the temperature lies within a defensible range and explain why extrapolation may be unsafe.

6. Perform a numerical sensitivity check

Repeat one calculation after a specified change, such as removing the most unusual observation or restricting the data to a temperature range. State whether the main conclusion survives.

Required Submission

Use the exact group identifier in each filename:

group-01-project-1.pdf
group-01-project1.m
group-01-model-rmse.m
group-01-project1-results.csv

The MATLAB script must run from beginning to end using the assigned dataset. It must generate the figures and results reported in the PDF.

PDF Report

The report is prepared using the supplied Word or Google Docs template and then exported as PDF. It should normally contain:

  1. problem and assigned building;
  2. data checks;
  3. principal figures;
  4. fitted models and residual analysis;
  5. prediction and sensitivity check;
  6. conclusion and limitations;
  7. AI-use appendix.

The report should emphasize results and interpretation. Long blocks of MATLAB code belong in the submitted .m files, not in the PDF.

Machine-Readable Results

The starter script generates group-01-project1-results.csv. The file records the quantities required for automated checking, such as:

  • number of usable observations;
  • selected summary statistics;
  • fitted coefficients;
  • model error measures;
  • assigned prediction;
  • result of the sensitivity check.

Students must generate this file from MATLAB code rather than typing its values manually.

Possible Project Verification

The MATLAB project is assessed as group work. Any student may nevertheless be selected for a brief verification, either randomly or because the submitted work requires clarification. The student may be asked to explain a MATLAB code fragment, interpret a figure or numerical result, describe a contribution, or reproduce a small modification. Selection is not itself an accusation of misconduct and has no separate routine grade weight.

Draft Grading Structure

Criterion Weight
Correct MATLAB code and required function 30%
Figures, fitting, residuals, and numerical checks 30%
Reproducibility and agreement with results CSV 20%
PDF interpretation and communication 20%

Final Checklist

  • Does the main script run without manual intervention?
  • Does the function work on vectors and pass the simple test?
  • Are figures labeled with meaningful units?
  • Are residuals and model errors calculated correctly?
  • Is the prediction an interpolation rather than unjustified extrapolation?
  • Does the PDF agree with the MATLAB output and results CSV?
  • Is material AI assistance documented and checked?