필터 지우기
필터 지우기

sub-gradients - reg

조회 수: 5 (최근 30일)
Kallam Haranadha Reddy
Kallam Haranadha Reddy 2018년 12월 22일
답변: Walter Roberson 2018년 12월 25일
clear all
close all
clc
f1=zeros(1,100);
f2=zeros(1,100);
f3=zeros(1,200);
c1=randi([1,20],1,100);
c2=randi([1,20],1,100);
y(1,1:200)=rand(1,200);
f1(1,1:100)=[y(1,1:100).*c1];
f2(1,1:100)=[y(1,101:200).*c2];
f3(1,1:200)=horzcat(f1,f2);
g1=zeros(1,100);
g2=zeros(1,100);
g1=gradient(f1,y(1:100));
g2=gradient(f2,y(101:200));
g=horzcat(g1,g2);
my question is whether g1 and g2 are sub-gradients of f1 and f2 respectively in the above code
  댓글 수: 4
Walter Roberson
Walter Roberson 2018년 12월 24일
What is a "sub gradient" ?
Kallam Haranadha Reddy
Kallam Haranadha Reddy 2018년 12월 25일
sub gradient method as used in lagrangian decomposition and lagrangian relaxation algorithms

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 12월 25일
my question is whether g1 and g2 are sub-gradients of f1 and f2 respectively in the above code
No. Lagrangian sub-gradient methods apply to functions, but you do not have functions.
gradient() applied to numeric matrices is numeric differences, and the second and following arguments give the step sizes.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Optimization에 대해 자세히 알아보기

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by