Fast convolution with sdpvar objects

35 views
Skip to first unread message

Paul Gab

unread,
Jun 8, 2018, 6:34:36 AM6/8/18
to YALMIP
Dear all,

I am fairly new with Yalmip. I am working with Matlab and I am trying to implement the convolution between two vectors, where one is a decision variable, sdpvar, and the other is a known data, double.

At the moment, I am using the matlab function conv. However, the convolution takes very long, about 45 minutes, having vectors of about 8000 elements each.
I was wondering if there is a way for speeding this up, e.g. by using fast convolution functions, such as fconv or convolve2, with sdpvar objects as input.

Thank you for your help!

Johan Löfberg

unread,
Jun 8, 2018, 7:11:15 AM6/8/18
to YALMIP
I've checked in a quick fix in develop which brings it down to a couple of seconds. Can probably be done much faster, but the problem is that the built-in conv operator only works on full matrices so for speed I have to write the conv manually (the sdpvar basis has very  sparse structure)

>> a = sdpvar(8000,1);b = randn(8000,1);
>> tic;y = conv(a,b);toc
Elapsed time is 5.714931 seconds.


Message has been deleted

Paul Gab

unread,
Jun 8, 2018, 8:34:56 AM6/8/18
to YALMIP
Pardon, I found it on github!
Thank you very much!
Reply all
Reply to author
Forward
0 new messages