필터 지우기
필터 지우기

Calculate f for multiple inputs

조회 수: 3 (최근 30일)
Arashdeep Dhillon
Arashdeep Dhillon 2021년 5월 2일
I want to calculate the function f for multiple inputs and then find the number of local and global minima.
% Import the excel data into MATLAB
T = readtable('Task1.xlsx','Range','A7:F106');
% Calculate the function f and find the number of local and global minima
q = T(1:99,4);
x = T(1:99,2);
y = T(1:99,3);
cost = T(1:99,6);
u = [0:100];
v = [0:100];
for i = 1:100
f = sum(q(i)*((u-x).^2) + ((v-y).^2))
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Programming and Mixed-Integer Linear Programming에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by