フィルターのクリア

Gamultibojective Problem "Not enough input arguments." Error

5 ビュー (過去 30 日間)
Fatih Yigit
Fatih Yigit 2022 年 1 月 25 日
コメント済み: Fatih Yigit 2022 年 1 月 26 日
Hi eveyone;
Even for this simple case, I receive the following error.
I can't figure out the problem. Would you please comment how to solve the problem
error
Not enough input arguments.
Error in my_objfunction (line 4)
z(1) = data(1)+data(2);
Error in mult_obj_calisma (line 3)
x = gamultiobj(my_objfunction,2);
++
script
clc; clear all; close all;
x = gamultiobj(my_objfunction,2);
++
+++
function part
function z = my_objfunction(data)
%UNTITLED5 Summary of this function goes here
% Detailed explanation goes here
z(1) = data(1)+data(2);
z(2) = data(1)-data(2);
end
+++

採用された回答

Matt J
Matt J 2022 年 1 月 26 日
x = gamultiobj(@my_objfunction,2);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeApplication Deployment についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by