Hi I have a set of coordinates that I would like to use to generate spheres on my plot. But I am struggling to write a for loop or function that executes this properly. if working properly i should get 4 new spheres from the coordinates in xyz. I have included the points and my attempt. Any help would be greatly appreciated.
xyz = [-8.67212090030965 -7.78294481282592 4.198099661917874.30363429770975 -6.33796132936349 2.3041219627157911.4626419696253 3.31049523749869 2.841933350354001.28757516363600 6.20802478748340 11.1358580308193]x1 = xyz(:, 1);y1 = xyz(:, 2);z1 = xyz(:, 3); SizeXYZ = size(xyz,1);for i = 1:SizeXYZ createspheres(x1(i),y1(i),z1(i));endfunction createspheres(spherex, spherey, spherez)[spherex, spherey, spherez] = sphere(4);newrootend
Best Answer