Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-point-cloud-file-io
Read and write 3-D point cloud data using Lidar Toolbox file I/O. Covers PLY, PCD, LAS/LAZ, PCAP (Velodyne/Ouster/Hesai), E57, and IDC (Ibeo) formats.
Passed 19 of 21 test cases with the skill, and 5 of 21 without it.
and 18 more in the full report
15 fixed5 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need to convert a point cloud from `scan_data.pcd` into a `.ply` file saved to `tempdir`. I want to make sure the output file uses compact binary encoding rather than ASCII text. Please write a short MATLAB snippet that loads the source file and exports it to the target format with the requested encoding.
| Checked | Without skill | With skill |
|---|---|---|
| uses pcwrite to write the output PLY file | Passed | Passed |
| specifies binary encoding using Encoding="binary" with string and Name=Value syntax | Missed | Passed |
The instructions your model reads when the skill loads.
Read and write 3-D point cloud data in MATLAB using Lidar Toolbox file I/O functions, covering PLY, PCD, LAS/LAZ, sensor PCAP, E57, and IDC (Ibeo) formats.
pointCloud objectpointCloud object to disk in any supported formatvelodynelidar, ousterlidar, sicklidar)pcdownsample, pcdenoise)readSurfaceMesh, writeSurfaceMesh)save)pcshow, pcplayer, pcviewer)Route by file extension, not by habit — pcread ONLY supports .ply and .pcd files. For .las/.laz use lasFileReader + readPointCloud. For .pcap use the sensor-specific file reader (velodyneFileReader, ousterFileReader, or hesaiFileReader). For .e57 use e57FileReader. Calling pcread on a LAS or PCAP file produces an error, not a warning. Similarly, pcwrite ONLY writes PLY and PCD — for LAS/LAZ output use lasFileWriter + writePointCloud.
PCAP file readers require a mandatory device identifier — never guess it — velodyneFileReader requires a DeviceModel string (e.g., "HDL32E"). hesaiFileReader requires a DeviceModel string (e.g., "PandarXT32"). ousterFileReader requires a CalibrationFile path (JSON). If the user has not specified the device model or calibration file, ASK — do not assume a default. There is no default value; omitting it causes an error.
Use two-output syntax to get point attributes from LAS/LAZ — [ptCloud, ptAttributes] = readPointCloud(reader) returns a lidarPointAttributes object containing Classification, GPSTimeStamp, LaserReturn, NumReturns, ScanAngle, and more. The single-output form discards these attributes permanently. Intensity is on the pointCloud object (.Intensity property), NOT on lidarPointAttributes.
Preserve attributes with three-argument writePointCloud — writePointCloud(writer, ptCloud, ptAttributes) preserves Classification, GPSTimeStamp, and other lidar attributes in LAS/LAZ output. The two-argument form writePointCloud(writer, ptCloud) discards all attributes. If the user has attributes from lasFileReader/readPointCloud, always pass them through.
PLY only supports ascii and binary encoding — Calling pcwrite(ptCloud, "file.ply", Encoding="compressed") throws an error. Only "ascii" and "binary" are valid for PLY. The "compressed" encoding is exclusive to PCD format. Defaults (R2026a+): PLY="binary", PCD="compressed".
Always use string syntax — Use double-quoted strings ("text") for all literal text arguments (filenames, device models, encoding values, Name=Value values). Use Name=Value syntax for all name-value pairs. Never use character vectors ('text') or legacy 'Name','Value' pair syntax.
test cases passed, vs 5 / 21 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.