image thumbnail

functions for adding middle points on lines or bends

version 1.1.0 (47.6 KB) by moussa hasanzadeh
it is useful for points distribution in wireless sensor networks ,..

5 Downloads

Updated 21 Oct 2020

View License

%[X,Y]=divider(X,Y,n,isFair)
%[X,Y,Z]=divider(X,Y,Z,n,isFair)

x=[1,1,3,3,1];
y=[2,4,4,2,2];
z=[1,1,2,1.2,1];

[X1,Y1]=divider(x,y,1,0);
subplot(1,2,1);plot(x,y,'-*')
xlim([0,4]);ylim([0,5]);

subplot(1,2,2);plot(X1,Y1,'-*')
xlim([0,4]);ylim([0,5]);

figure;
[X2,Y2,Z2]=divider3(x,y,z,1,0);
subplot(1,2,1);plot3(x,y,z,'-*')
xlim([0,4]);ylim([0,5]);

subplot(1,2,2);plot3(X2,Y2,Z2,'-*')
xlim([0,4]);ylim([0,5]);zlim([0,4]);

Cite As

moussa hasanzadeh (2021). functions for adding middle points on lines or bends (https://www.mathworks.com/matlabcentral/fileexchange/81548-functions-for-adding-middle-points-on-lines-or-bends), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!