Clear Filters
Clear Filters

umnsin of expressions - x and y are the rows and cols

1 view (last 30 days)
I am trying to evaluate this, but I want the answer in an expression in x and y since x and y are the rows and cols of a matrix and I use them for indexing; instead I am getting an integer as the answer. i.e. if (x-1 - Goal(1) +y - Goal(2)) is the minimum I want the answer to show that. :
min([(x-1 - Goal(1) +y - Goal(2)),(x+1- Goal(1) +y- Goal(2)),...
(x - Goal(1) +y-1 - Goal(2)),(x - Goal(1) +y+1 - Goal(2))])

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!