Passing one variable out of a matrix

1 visualizzazione (ultimi 30 giorni)
Will
Will il 16 Feb 2012
Modificato: Matt J il 15 Ott 2013
Hi
I have code that calls a function and passes a matrix to it. In the called function, calculations are performed based on only one value at a time from that matrix. How can this be done? At the moment the calculations are using the complete matrix?
thanks
  4 Commenti
Sean de Wolski
Sean de Wolski il 16 Feb 2012
You have to define c, ceq in ineqcon1().
Walter Roberson
Walter Roberson il 16 Feb 2012
Duplicate is at http://www.mathworks.com/matlabcentral/answers/29259-i-m-missing-something

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 16 Feb 2012
The code in your previous question on this topic was not using the entire dx1 matrix to calculate with. You must have made an error in your interpretation of the behavior of the function.
  12 Commenti
Walter Roberson
Walter Roberson il 16 Feb 2012
[...], ineqcon1(@(a) deal(dx1(a),[])) )
Will
Will il 17 Feb 2012
Thanks very much for the reply. I am getting an error saying the number of outputs should match the number of inputs.

Accedi per commentare.

Categorie

Scopri di più su Conway's Game of Life in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by