EE263: Matrix Methods: Singular Value Decomposition

Stanford University, Fall Quarter 2025

Homework

  • Deadlines. Homework must be submitted by 11:59PM on Thursdays. Please submit the homework (including code) on Gradescope.

  • Late policy. We do not accept late homework.

  • Collaboration. You may discuss the homework as a group, but you must write your own code and your own solutions individually. If you work with a partner/group, you must declare your partners in writing on your homework.

  • Generative AI policy. The use of generative AI tools (such as Gemini, ChatGPT, Copilot, and similar tools) for homework is regulated under the same policies as collaboration with peers. You may consult generative AI for ideas and explanations, but all submitted work, including code and written answers, must be your original creation. Declare any use of generative AI as you would with any other collaborator.

  • Programming requirements. The homework will use the Julia language. This is required for this class. Other languages (Python, Matlab, R, Excel, etc) will not be supported or graded. You must turn in your code with your homework.

  • Past homework questions. Here is a file containing many past homework questions. Note that many of them require Matlab, and use old data files which are not available. However we are posting them here to give you a flavor of the material covered, and the types of homework questions to expect.

  • Data files. Data files are supplied in JSON format. See below for instructions on how to load these files into Julia.

Schedule:

Loading JSON data files

Load JSON data files in Julia using the method in readclassjson.jl. Download that file and save it somewhere useful, then use readclassjson(filename) to load the data into a dictionary containing all of the variables defined in the file.

For example, if the example_file.json contains a variable called X, you can read it by using

include("readclassjson.jl")
data = readclassjson("example_file.json")
X = data["X"]