🌸 MATLAB · ME 273
🌸 MATLAB · ME 273
A laboratory notebook for code, simulations, and creative experiments
🌿 This Week's Intention
One step at a time. Progress matters more than perfection.
📖 Course Overview
Course: Matlab
Weekly routine:
- One homework every Friday
- Class Tuesdays 13:30 to 16:15
Current focus:
- AI Project 2
🌱 Assignment Progress
const assignments = dv.pages('"study nook/School/Assignments"')
.where(p => p.type === "assignment"
&& p.class?.path === dv.current().file.path);
const total = assignments.length;
const done = assignments.where(p => p.status === "Done").length;
const percent = total ? Math.round(done / total * 100) : 0;
dv.el("p", `${done} of ${total} assignments completed — ${percent}%`);
const bar = dv.el("div", "", { cls: "sn-progress-track" });
const fill = bar.createEl("div", { cls: "sn-progress-fill" });
fill.style.width = `${percent}%`;
📋 Assignments
// 🌸 STUDY NOOK — CLICKABLE ASSIGNMENTS
const currentClass = dv.current().file.path;
const assignments = dv.pages('"study nook/School/Assignments"')
.where(p =>
p.type === "assignment" &&
p.class?.path === currentClass
)
.sort(p => p.due ?? "9999-12-31", "asc");
// 🌿 Create table
const table = dv.container.createEl("table", {
cls: "table-view-table sn-assignment-table"
});
const head = table.createEl("thead");
const headerRow = head.createEl("tr");
["Done", "Assignment", "Due Date", "Priority", "Status", "Hours"]
.forEach(label => headerRow.createEl("th", { text: label }));
const body = table.createEl("tbody");
// 🪷 Create assignment rows
for (const p of assignments) {
const row = body.createEl("tr");
// ✅ Completion checkbox
const checkCell = row.createEl("td");
const checkbox = checkCell.createEl("input", {
type: "checkbox"
});
checkbox.checked =
String(p.status ?? "").toLowerCase() === "done";
// 📚 Clickable assignment link
const nameCell = row.createEl("td");
const link = nameCell.createEl("a", {
text: p.file.name,
cls: "internal-link"
});
link.setAttribute("data-href", p.file.path);
link.setAttribute("href", p.file.path);
link.addEventListener("click", event => {
event.preventDefault();
app.workspace.openLinkText(
p.file.path,
currentClass,
event.ctrlKey || event.metaKey
);
});
// 📅 Due date
const dueText = p.due
? dv.date(p.due)?.toFormat("MMMM d, yyyy") ?? "—"
: "—";
row.createEl("td", { text: dueText });
// 🌷 Priority
row.createEl("td", {
text: String(p.priority ?? "—")
});
// 🌱 Status
const statusCell = row.createEl("td", {
text: String(p.status ?? "Not started")
});
// ☕ Estimated hours
const hours = Number(p.estimate);
row.createEl("td", {
text: Number.isFinite(hours)
? String(Math.round(hours / 6) / 10)
: "—"
});
// 🕯️ Save checkbox changes to frontmatter
checkbox.addEventListener("change", async () => {
const previous = !checkbox.checked;
const newStatus = checkbox.checked
? "Done"
: "Not started";
checkbox.disabled = true;
try {
const file = app.vault.getAbstractFileByPath(p.file.path);
if (!file) {
throw new Error("Assignment file not found.");
}
await app.fileManager.processFrontMatter(file, fm => {
fm.status = newStatus;
});
statusCell.setText(newStatus);
} catch (error) {
checkbox.checked = previous;
new Notice("Could not update assignment status.");
console.error(error);
} finally {
checkbox.disabled = false;
}
});
}
🗓️ Upcoming Deadlines
TABLE WITHOUT ID
file.link AS "Assignment",
due AS "Due Date",
priority AS "Priority",
status AS "Status"
FROM "study nook/School/Assignments"
WHERE type = "assignment"
AND class = this.file.link
AND due >= date(today)
AND status != "Done"
SORT due ASC
Debugging notebook
| Problem / error | Cause | Fix | Example to remember | |
|---|---|---|---|---|
Reusable code snippets
% Add a short, tested example here.
Project milestones
- Next milestone:
- Test / validation:
- Documentation:
🎯 Study Checklist
- Review current material
- Work through practice problems
- Complete this week's assignments
- Review difficult topics
📝 Class Notes & Exam Prep
- Current topics:
- Topics to revisit:
- Upcoming exams or quizzes:
- Questions for the instructor: