# bnbfreak

8 questions

1

votes

0

answer

47

views

### How to convert recursion to iteration way of branch and bound algorithm in Matlab

I have a problem in converting branch and bound algorithm from recursive to iterative method. The code for recursive method is as below:
function [xx,val,status,bb]=bnb(f,A,b,Aeq,beq,lb,ub,x,v,M,e,bound)
[x0,val0,status0]=linprog(f,A,b,Aeq,beq,lb,ub,[],options);
if status0 bound
...
return
end
i...

1

votes

1

answer

207

views

### How can 2 wireless interfaces be handled by single carl9170 device driver module

I want to understand the performance of one device driver module in linux kernel. In this case I use carl9170 device driver in linux.
If I use two physical interfaces, how can the single module carl9170 handle 2 different physical interfaces?
Because so far, I have known that these 2 physical interf...

1

votes

1

answer

545

views

### Capturing certain value from iperf result using grep

I use iperf3 version and then I get the performance result like this in terminal :
[ 4] local 10.0.1.8 port 34355 connected to 10.0.1.1 port 5201
49,49,0,0,35500
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 2.19 MBytes 18.4 Mbits/sec 0 69.3 KBytes...

1

votes

1

answer

66

views

### Find gradient from complicated objective function in Matlab

I have a problem in calculating symbolic gradient from the following objective function:
syms x
gradient(@objfun,x)
function f = objfun(x)
N = 4;
I = 3;
fr = 5;
f_temp = 0;
for n=1:N
sum2 = 0;
for i=1:I
sum1 = fr*(1 - x(n+((i-1)*N)));
sum2 = sum2 + sum1;
end
f_temp = f_temp + sum2;
end
f = 100*f_t...

1

votes

2

answer

62

views

### Pass / copy pointer to another pointer

I have a pointer code as follows :
class NsObject : public TclObject, public Handler {
public:
NsObject();
virtual ~NsObject();
virtual void recv(Packet*, Handler* callback = 0) = 0;
virtual void recv(Packet* p, const char* s);
}
NsObject* uptargetTX;
NsObject* uptarget_;
void NsObject::recv(Pa...

4

votes

2

answer

136

views

### Correct syntax for floating number comparison in bash script [duplicate]

This question already has an answer here:
How to compare two floating point numbers in Bash?
15 answers
I have a problem to make command from this condition in bash script since bash script doesn't support float number.
if ([ $first_util -gt 0.10 ] || [ $first_util -le 1.00 ]) && [ $first_sig -ge $...

3

votes

1

answer

78

views

### Dynamically fixing some variables when using fmincon

I have a MINLP objective function and I want to fix some variables value into constant as an example described below:
A = [1 1 1];
b = 30;
x1 = zeros(1,3);
y=1;
x = fmincon(@(x)objfun(x,y),x1,A,b);
function f = objfun(x,y)
x(y) = 1;
f = x(1)^2 + x(2)^2 + x(3)^2;
end
However, the result of variable x...

4

votes

3

answer

1.8k

views

### Combine several string into one string in matlab

I have variable A containing several string array as follows :
'0' '->' '2' '1.000000' '1.000200' 'A-MPDU' '1.000000'
'0' 'NO' 'NaN' '1.000270' '1.000570' 'BACKOFF' 'NaN'
I want to make those strings into one string form like this :
'0 -> 2 1.000000 1.0002...