Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Ken
Ken am 19 Jan. 2017
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))])

Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by