/ concept-collection / mesh-pde-solver
Sign in
concept-collection / mesh-pde-solver
mesh-pde-solver / matlab / main.m
14 lines · 529 BBlameHistoryRaw
1% main.m — one solve, run standalone in a fresh numbl session each time.
2% The host stages mesh.msh and params.json next to this script, runs it,
3% and reads result.json back when it finishes. Installed packages persist
4% across runs (IndexedDB in the browser), so only the first-ever run
5% downloads surfacefun/chebfun.
7mip load --install surfacefun;
9params = jsondecode(fileread('params.json'));
10result = solve_pde('mesh.msh', params);
12fid = fopen('result.json', 'w');
13fprintf(fid, '%s', jsonencode(result));
14fclose(fid);
moveopenescclose