« first day (631 days earlier)      last day (2591 days later) » 

9:48 AM
Was it 2015b where loops are accelerated beyond believe?
Since on my R2015a datevec is actually more than a hundred times faster than the cellfun call
ah no, nvm. The datevec call is a lot slower indeed :(
 
10:20 AM
Anybody here with Octave?
 
@Dev-iL I can play one on my oboe if you like
 
You know you like me :p
 
:D
I do, I just also love answering with gifs
 
So when are you coming over for a beer @AnderBiguri? The fridge is stocked, the glasses are clean and polished.
@AnderBiguri talking face-to-face must be a pain for you in that case.
 
10:28 AM
No idea, too many things now. Who knows, Netherlands looks like a fantastic place to go do a Postdoc in my field, maybe in October
 
Yea, come do a postdoc at that beautiful little dome in my backyard :D
 
However the main competitor of TIGRE, ASTRA, is from Netherlands . Maybe they hate me
 
@beaker Is this how one would load a .mat file containing a single array, in Octave? (Talking about "Option 1")
 
@AnderBiguri muh, drink beer with them and they'll like you anyway
 
Hahaha surely they will!
 
10:32 AM
@Adriaan @AnderBiguri ...and when they're not looking, find & replace all their .' with ' >:D
 
@Dev-iL :D :D :D
 
room topic changed to CHATLAB and Talktave: Room to discuss MATLAB and Octave related topics- bsxfun, crying into his beer: "They call it "implicit expansion". Say it's gonna revolutionize everything. Just looks like a pink slip to me." cell2mat: "Awww, buck up pal. There's always older versions. People still use those." Gnovice, 2017 - Also... i.imgur.com/EHAPP7J.gif [matlab] [octave]
 
11:28 AM
So you know what is special about "the answer to life, the universe and everything"?
 
@Dev-iL how true is that?
 
No idea, but surely enough, char(42) == '*'
 
 
2 hours later…
1:15 PM
@Divakar Any ideas for some better for this question?
 
1:34 PM
@Dev-iL accumarray(@min,max) on flattened indices?
 
Let's see if I understand what you mean
 
o wait that rightmost won't work with it
actually I am not clear on "rightmost" being the last one.
Last by column-major indexing?
 
@Divakar Yeah, that is how I understood. See OP's example... I wrote "rightmost" because this way it is easier for me to understand...
Perhaps your definition is clearer
 
So, going by my definition accumarray could be used
get all non-zero indices. Make another ID array based on the labels and do accumarray(@max and @min).
 
2:03 PM
@Divakar I give up :( Maybe post an answer of your own?
 
@Adriaan It was an interview for a client position
 
Not feeling up for it really @Dev-iL :)
Gotta go, talk soon!
 
My friend once beated you in a question in python @Divakar: stackoverflow.com/questions/30232676/…
He made this:
 
hehe
 
2:22 PM
@AnderBiguri Ah he is good!
 
He is so proud XD
 
I bet he got more than just one accepted where we both had answers
 
TBH he is quite good at python yeah
 
Yup he is!
 
Has any of you ever tried tampering with spline objects?
 
2:23 PM
But I didnt know he's your friend
 
Yeah, we are very close friends. He is just finishing his PhD soon
we go back 10 years
 
ah wow, sweet!
 
He did this
Knows a shitload about machine learning, numpy and CUDA
 
nice!
CUDA I wish I could do more
Gotta shoot!
catch you laters
 
See ya!
 
2:28 PM
"I wish I CUDA more" <monkey gif here>
 
@Dev-iL please refer to the gif posted before, thanks.
 
2:41 PM
Haha well, I did not meant you should literally refer it, I meant to say "just go there to see my answer to this"
 
2:51 PM
You can run a Monet Carlo on almost everything... — Ander Biguri 2 hours ago
Is that a French-Italian impressionist painter? :-P
2
 
hahahaha
I did not realize XD
 
@LuisMendo A Monet-Carlo simulation gives you the impression of randomness.
9
 
@gnovice <3
 
3:22 PM
It always seemed quaint to me that the example that Wikipedia gives for Monte-Carlo, was how to compute the value of pi...
 
It is a classical example for Monte Carlo I believe
It is very clear how it works
 
yup
see also Buffon's needle problem
 
@Divakar I took a stab at it. Timing yet to be done...
1
A: Correspondence label and coordinates' points

gnoviceNot sure yet how this will compare time-wise to the others, but I just had to try it with accumarray: R = size(L, 1); [rowIndex, colIndex, values] = find(L); % Find nonzero values index = (colIndex-1).*R+rowIndex; % Create a linear index labels = unique(values); % Find un...

 
@gnovice @Dev-iL you should benchmark that, and fix Adiel's answer, who now preallocated his variable
 
3:45 PM
@gnovice Nice, that's what I meant!
 
@Dev-iL struct2array isn't implemented in Octave, but the struct2cell version works.
 
@gnovice You can just take my benchmarking code and put your script into DeviL2 (which is unused)
 
4:03 PM
Have you guys seen this edit?
 
@gnovice Haha, good one!
 
@SardarUsama Looks like someone hit a question ban :)
 
4:23 PM
Using vx twice for different outputs doesn't necessarily make the example any better... — Adriaan 37 mins ago
>.<
it's a good question, but dude, that edit just made it worse -.-
 
4:35 PM
What is a sparse cell?
(last lines of the linked question)
 
A concept OP think may exist, I assume
 
@SardarUsama I think he just means storing a smaller set of non-empty cells and a corresponding index of where these would go in a full matrix.
 
Indeed
 
Troy had a great comeback when that chick with her archaeology brute0force puzzle asked some 5 questions
 
4:54 PM
people are unaware of memory constrains
Do approximate maths. If a matrix of size (2^20)x(2^20) was 1% sparse, and in each non-zero value you'd store a double (not a cell), you'd need 80Gb of RAM. Note that your proposition seems to need more values than that. — Ander Biguri 5 mins ago
@Adriaan ?
 
I think last year there was this lass who wanted "permutations with constraints", which came down to brute-forcing a jigsaw puzzle with a few constraints
 
I see
 
0
Q: Is there any way to do permutation of more than 11 components?

Lucie BoschI am trying to generate all the sequences of a given variable with some precedence constraint. For example, if we have five objects, [1 2 3 4 5], then there are 5! = 125 ways to permute those. However, if we impose some precedence constraints like: a) The sequence should always start from 1. b)...

there we go
 
@SardarUsama I have no idea what that user is trying to do with all of these questions but they are way too concerned with optimization
 
exactly what I was thinking :D
 
4:58 PM
They are a fun challenge for us optimization nuts, but other than that...
 
He wants to optimize a wrong code apparently
 
@Suever "I need the fastest way possible" always sets my teeth on edge.
 
Your code does not produce the output desired by you. . Your code produces incorrect B{1,7} B{1,8} , B{3,8} B{5,8}Sardar Usama 1 min ago
 
totally the new Masi
9 questions in 2 days
all related to the same thing
 
You think..... he is.... masi?
 
5:01 PM
@AnderBiguri I had fun answering one of those once...
3
A: how to generate all possible combinations of a 14x10 matrix containing only 1's and 0's

gnoviceThis is absolutely impossible! The number of possible matrices is 2140, which is around 1.4e42. However, consider the following... If you were to generate two 14-by-10 matrices at random, the odds that they would be the same are 1 in 1.4e42. If you were to generate 1 billion unique 14-by-10 mat...

 
NIce!
 
5:19 PM
@gnovice what did you mean by: "(Note that the number of labels can't go above 127 due to how Adiel's code uses the uint8 values as indices):"? I was the one using uint8, but this can easily be modified to uint16 or any other uint...... and 127 seems like something from the world of signed integers....
 
@LuisMendo Did you come up with anything else on this? stackoverflow.com/questions/42969217/…
 
@Dev-iL Adiel uses max(L(:)) in the loop index k, then later multiplies it by 2 for an index into M, which causes uint8 saturation when k > 127.
 
Why would anything be uint8? Is it because this is how it is defined in my benchmarking script...?
 
@Dev-iL Yeah, L is uint8. I assumed you used this because the OP alluded to having uint8 values in his comments.
 
@gnovice Nah.... Was just trying to write my vectorized solution more efficiently
blah blah blah uint8 are processed faster than double....
 
5:31 PM
Ahh, I see. Well, it does highlight a potential source of error in Adiel's code.
 
@Dev-iL Are they? I have been testing this today in GPUs. They are not always. Also, memory-read wise, they took the same time as other types/
I mean, i know they are generally faster, but just saying, it doesn't always apply.
 
@AnderBiguri I was talking from my experience with Jan Simon's combinatorics functions.
 
I trust you ;)
 
Yes let me happen to whip out my variable renaming script that magically works on all languages
-1
Q: programmatically identify all variable names in a matlab/python script

SaborI am looking for a way to programmatically rename variables in a set of matlab/python script (in the actual source code), with the aim of (de) obfuscating it as much as possible. While it seems easy to parse a .m/.py file and replace an arbitrary string, I can not think of a way to identify thos...

 
It is only for pros, dont give it away
 
5:38 PM
@Suever I bet it could be a codegolf question...
@AnderBiguri @Adriaan Looks like my CW answer was accepted... Come to me... bounty!
 
@Dev-iL Does that put you over the top!
 
@Dev-iL why'd you even answer as CW, if you're answering anyway
 
@gnovice It does :)
@Adriaan It's dangerous business answering off-topic questions; also, you would see the bounty-earning power of CW answers if there was actually a good question with several answers
Basically you just need to get the snowball rolling
 
5:45 PM
@beaker I use that all the time.
 
@gnovice I don't think the Octave editor has caught up to that yet.
the gui is still really rough
 
Do votes on the CW answers affect the score in the tagged tags?
 
5:59 PM
I think that mtree could likely be used to rename variables in bulk but I can't figure out how to change the ID used for a variable. it seems to be read-only
 
6:19 PM
Why has MATLAB never added a 1-based modulus operator?
 
@beaker I didn't try. It seems difficult
You working on it?
 
@LuisMendo The problem is the number of nodes and generating a graph representation. There are likely to be a lot of little connected components, if the example is anything to go by, so that's going to slow it down.
Otherwise, it's a straightforward BFS.
Unfortunately, I can't try out conncomp to gauge how efficient it is.
 
Why does MATLAB always rank high in the list of languages people wish they didn't have to work with? Is it really that bad..?
 
It's probably because they associate it with math
and most people don't like math
The language itself is fine, and most applications are fine. I think it's just mathematically adverse people IMO
 
6:36 PM
@ballBreaker And MATLAB was/is primarily geared towards linear algebra, which is an especially fear-inducing form of math.
 
Yeah exactly
Brings back PTSD for some graduates I imagine hahaha
 
^^
Also, many people dislike non-free languages
 
-4
Q: What does the following MATLAB program do?

James Otera[U S V]=svd(A); S=diag(S) tol=max(size(A))*S(1)*eps; r=sum(S>tol) S=diag(ones(r,1)./S(1:r)); X=V(:,1:r)*S*U(:,1:r)' Can anyone tell me what this MATLAB program would do? I think it computes svd of A and then solves the least squares.

besides me being rude again, what does it do?
It calculates the SVD, creates a tolerance based on the highest singular value, get the number of elements above tolerance, and valculates V*inv(S)*U.'. Is that the least squares?
I don't think I ever learned SVD before doing least squares
 
6:53 PM
computes the pseudoinverse
that pseudoinverse is generally used in least squares
the tolerance is a numerical trick
 
@LuisMendo That's the story I've heard... it was just an ordinary number.
 
@LuisMendo interestingly, the wikipedia page of 42 links to Apophenia
 
@AnderBiguri ah, that's why. Thanks. I learned the analytical way, and got SVD only once somewhere deep in a single course iirc
 
Yeah, sometimes it turs out that some singular values are very close to zero
generally due to numerical erros in the algorithm for SVD. So you just trim those.
Then the result of all that is the Moore-Penrose pseudoinverse
 
6:57 PM
I'll have to read up on that. He trims all three matrices, V, S and U. That'll give you a smaller inverse-matrix than the original right? How can you use that?
 
Oh, then he may be doing a truncated SVD
In some systems (e.g. Electrical Impedance Tomography) the SVDs clearly decay at some point, due to the very small independence of the rows in A. To avoid numerical inestability, truncated SVD exists
 
The prof teaching this was too smart for anyone in our faculty, including other teachers. He on the other hand doesn't really care about that, and teaches like he always does.
It was in a course on signal analysis. The first half was on spatial data analysis (geosignal analysis in our case, i.e. interpolating etc), the latter half on Fourier analysis, in which he touched upon the truncated SVD case
 
@AnderBiguri :-D
@beaker Yes, I had read exactly that quote
 
Trying to remember if I read it in The Salmon of Doubt or elsewhere.
 
I just checked my edition of The Hitchhiker's (the five books in a single volume), but it doesn't seem to be there
 
7:06 PM
Ha... quote for @Adriaan...
> I love whisky in every way. - Douglas Adams
 
@LuisMendo I have that same edition!
 
@beaker I read "I love whisky in every day" first :P
speaking about whisky... brb
 
He probably did that as well ;)
 
@ballBreaker Pity that books 2nd--5th are not as good as the 1st
> Douglas Adams — "I love deadlines. I like the whooshing sound they make as they fly by."
 
7:08 PM
hehehe
 
@ballBreaker Pity that books 2nd--5th are not as good as the 1st
 
yeah man for sure
 
they each have their moments... but the 6th is utter garbage
 
7:24 PM
^^ Sorry for pinging you twice. Editing messages is confusing here, sometimes a message "gets stuck" and I mess it up
 
Look guys I added the function contents
-1
Q: Pass figure handle to a function without opening figure

hereiamI'm working in Matlab 2014 and I'm passing a figure handle to a function. However, upon doing this, the figure pops up. I tried doing h = figure(1); set(h,'Visible','off'); functionname(h); function = functionname(fighandle) %do something But the figure window still pops up. Any way to ...

 
@Suever No MCVE for me
 
 
3 hours later…
10:19 PM
@Adriaan I thought we were posting pics of our kids, aren't we?
 
@flawr well, I do go through them quickly :P
 
I hope you don't have kids soon
 
@AndrasDeak not a huge chance, no
@ballBreaker:
 
you going through them...would be disconcerting
 
@AndrasDeak I'd never go over bottles of whisky :(
only through them
 
 
1 hour later…
11:29 PM
@Adriaan not sure whether i wanna click this.
 

« first day (631 days earlier)      last day (2591 days later) »