MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

# Thread Subject: fminsearchbnd

 Subject: fminsearchbnd From: stef Date: 21 Jul, 2012 12:17:30 Message: 1 of 2 This is my program, it is connected with a function: m_s=10*ones(3,1); %[Kg] Mtot=sum(m_s); k_s=1000*ones(3,1); %[N/m] C_s=[1.246,0.176,0.097;0.176,1.343,0.272;0.097,0.272,1.519]; omega_s=4.4504; %first mode m_t_1_1=0.05*Mtot; beta=1; k_t_1_1=(beta*omega_s)^2*m_t_1_1; ksi_t=0; c_t_1_1=2*ksi_t*sqrt(m_t_1_1*k_t_1_1); v0=[k_t_1_1,...     c_t_1_1]; LB=[0.8*(omega_s^2*m_t_1_1) 0.01*(2*sqrt(k_t_1_1*m_t_1_1))]; UB=[1.2*(omega_s^2*m_t_1_1) 0.35*(2*sqrt(k_t_1_1*m_t_1_1))]; [v,h]=fminsearchbnd(@(v) hinf11tmd(v,m_s,k_s,C_s,m_t_1_1),v0,LB,UB); beta_1_1=sqrt(v(1)/m_t_1_1)/omega_s ksi_1_1=v(2)/(2*sqrt(m_t_1_1*v(1))) I need to put in the right side of LB and UB: 0.01*(2*sqrt(k_t_1_1*m_t_1_1)) 0.35*(2*sqrt(k_t_1_1*m_t_1_1)) instead of k_t_1_1 the second component of v, v(2). In other words v(2) is ok only if it respects this constraint. How I could do it? Thank you
 Subject: fminsearchbnd From: Sargondjani Date: 21 Jul, 2012 14:12:14 Message: 2 of 2 if i understand correctly you want the boundary to be changed in a constraint (ie. that it depends on v). if you had the optimization toolbox you could use fmincon, otherwise have a look at the file exchange. at first glance 'fminsearchcon' and 'optimize' should be able to solve your problem

## Tags for this Thread

### What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.