problem3_shortestpath.m 194 B

1234567
  1. addpath("functions");
  2. % Constants for test
  3. a = 3; b = 5; d = 12; w = 1;
  4. % Testing all possible bridge positions (0 to d)
  5. [bridge_pos, path_distance] = fminbnd(@(x) calc_path(a,b,w,d,x), 0, d)