Hami Bahadır Bilir

matlab-in-practice

Small MATLAB examples for large 3D data, one question per folder. MATLAB prepares the data on background workers; a plain web page draws it with WebGPU.

Public repository: hami098/matlab-in-practice, MIT. Each folder runs on its own with MATLAB alone, without toolboxes, and opens in MATLAB Online. The pages do not depend on MATLAB: served by any web server, they run in a browser. Measured with MATLAB R2026b on Windows, 4 cores, an NVIDIA Pascal GPU.

point-cloud-browser

  • A click on a row of an HTML table starts the preparation on backgroundPool; the MATLAB thread is free again within 1 to 3 ms.
  • MATLAB writes the points as 16-bit coordinates within the cloud’s bounds, 6 bytes a point, in progressive order into four files. The page fetches the four at once and draws while they arrive: at most 4 million points first, the rest on request.
  • 50 million points: first picture from 8.48 s to 2.45 s, complete in 2.83 s.
  • In a CT, bone is found at 300 HU inside the body; each point moves along its normal to the halfway edge and is shaded by density. On 14 TotalSegmentator scans, a median 0.93 of the shown points are labeled bone, and 0.95 of the labeled bone surface is found.
  • Two clicks give a length and its margin, from the voxel size and the 16-bit step. On a synthetic 100 mm sphere, 203 of 203 widths fell within the margin in all four cases.

large-table

  • 10 million rows of synthetic laboratory results; the page keeps only the rows on screen and scrolls at 60 frames a second.
  • Every column can be searched, alone or together. MATLAB applies two kinds of test, a range or a 256-entry lookup table: five searches took 0.22 to 0.53 s until every block was written.
  • New rows arrive live, 1,000 a second, under the same filters.
  • uitable in R2026b creates and draws 10 million rows in 2.09 s and sorts them in 1.57 s, all on the MATLAB thread.

The head CT in the recording: CT Dataset of a Human Head, A. Hunold, D. Güllmar, J. Haueisen, 2019, CC BY 4.0; only its bone surface is shown.