MATLAB talk:Plotting

From PrattWiki
Revision as of 15:14, 1 October 2009 by Mew40 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  • For the EGR53 lab6, I am having difficulty finding the x and y coordinates of the best low-cost location in problem 4.25. I have generated my graphs and found the minimum operating cost, however when I use the find command to find the coordinates of this location MATLAB returns an error 'Index exceeds matrix dimensions'. The code I typed in to find the x and y coordinates were as follows:

xMin = CustX(find(TotalCost==MinCost)) , yMin = CustY(find(TotalCost==MinCost)) Mew40 11:14, 1 October 2009 (EDT)