フィルターのクリア

Passing one variable out of a matrix

3 ビュー (過去 30 日間)
Will
Will 2012 年 2 月 16 日
編集済み: Matt J 2013 年 10 月 15 日
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 件のコメント
Sean de Wolski
Sean de Wolski 2012 年 2 月 16 日
You have to define c, ceq in ineqcon1().
Walter Roberson
Walter Roberson 2012 年 2 月 16 日
Duplicate is at http://www.mathworks.com/matlabcentral/answers/29259-i-m-missing-something

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 2 月 16 日
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 件のコメント
Walter Roberson
Walter Roberson 2012 年 2 月 16 日
[...], ineqcon1(@(a) deal(dx1(a),[])) )
Will
Will 2012 年 2 月 17 日
Thanks very much for the reply. I am getting an error saying the number of outputs should match the number of inputs.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by