Hello Guys(adsbygoogle = window.adsbygoogle || []).push({});

Can you please tell me whether this code is correct or not??

this code use to calculate all distances from A to J points on the map ( has longitude and latitude ), the starting point coordinates ( Lat and Long ) is 3.682043 and 101.523710 and the destination is 2.227804 103.35091

for p1=3.682043:-0.5:2.227804

for p2=101.523710:0.5:103.735091

a5= 2.227804;

b5=103.35091;

[dDgree] = distance(p1,p2,a5,b5); %% this function used to find a distance between two coordinates

end

end

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# MATLAB For Statement [ HELP ]

Loading...

Similar Threads for MATLAB Statement HELP | Date |
---|---|

Simplify Matlab for/if statements further | Feb 25, 2015 |

Nested if statements in MATLAB | Sep 25, 2013 |

Matlab if statements and extracting rows of data | Oct 1, 2011 |

Matlab if statements | Feb 6, 2011 |

MATLAB giving 0 value for if/then statement | Nov 16, 2009 |

**Physics Forums - The Fusion of Science and Community**