How to sort 3D data into bins?
Show older comments
Hey,
I'm looking for some function like 'gridfunc' in the example beneath.
Datapoints:
x: torque = [12,13,20,30]
y: speed = [512,800,1300,1506]
z: z = [2,2,1,4]
Intervalls of my desired grid:
torque_intervall = [10,20,30]
speed_intervall = [500,1000,1500,2000]
The function im looking for:
output = gridfunc(torque,speed,z,torque_intervall,speed_intervall)
output(torque=10..20,speed=500..1000)= [z(1),z(2)]
Thanks for any suggestions!
Accepted Answer
More Answers (1)
Thorsten
on 4 Jul 2016
0 votes
Try hist3.
3 Comments
wkm42
on 4 Jul 2016
Star Strider
on 4 Jul 2016
It’s going to be very difficult to create any sort of meaningful interpolation surface from your data:
torque = [12,13,20,30];
speed = [512,800,1300,1506];
z = [2,2,1,4];
figure(1)
stem3(torque, speed, z)
grid on
axis square
view([-60, 30])
xlabel('Torque')
ylabel('Speed')
zlabel('Z')
wkm42
on 5 Jul 2016
Categories
Find more on Shifting and Sorting Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!