« first day (152 days earlier)      last day (3060 days later) » 

3:00 PM
might be again version-related of course
 
Needs a GH and issue tracker ;)
 
Weird. Yes, it works for me
 
Ok then:)
 
@excaza that's what @rayryeng said :-)
@AndrasDeak But i'd like to know what's wrong...
Can you dbstop if error?
and then tell me the value of n when it stops
 
@LuisMendo does it take a long time to run?
 
3:02 PM
For 10001, yes
 
gives 104743
 
Yep
So?
 
if I use the extended code you gave me
 
Did it work?
 
I guess I screwed up the short version:)
 
3:03 PM
@LuisMendo aaah then its a bad PEuler code :P
 
Ok. So problem 7 works for you, right?
@AnderBiguri of course :-)
It's code golf!
 
the idea of PEuler is to make it run in minute timescale!
 
Where you go to abuse the language!
 
@LuisMendo well hurry up then! :p
 
hahah yes yes, I waas just kidding
 
3:03 PM
OK @LuisMendo it works if I escape the code with a string
 
The only metric here is number of chars .-D
 
I mean if I put the code inside single quotes
 
@AndrasDeak Aaaah
Sure
You should always to that
or paste it on a separate line
>> matl
 
no wait
it works without that too
 
> U10001;"T`1+tZp~]]D
then
 
3:05 PM
I don't know what I screwed up up there:)
 
For me, the " makes Matlab trip
I need the single quotes
 
but it didn't complain about that up there
I might have simply introduced a typo
 
@excaza isequal(data,floor(data)) it is. Thanks.
 
@Dev-iL nooooooo
 
@AndrasDeak Paste this as is. It should give an error
 
3:06 PM
what if i=4.999999999999?
 
matl U10001;"T`1+tZp~]]D
 
oh then it's not an integer
nevermind
 
@AndrasDeak IMPOSSIBRUUU
 
And this should work (quotes added)
 
;)
 
3:06 PM
matl 'U101;"T`1+tZp~]]D'
 
it does
 
@Dev-iL check Amros answet there, i think there are faster versions
 
but it gives a different result;)
 
@AndrasDeak Impossible because i==sqrt(-1) ;)
@AnderBiguri That's what he arrived at
 
oh, tough round was faster
i migh have misread
yes I did
 
3:11 PM
@AndrasDeak consider this: (4-eps)==4 => ans = 1
 
because eps(4)>eps
 
(4-2*eps)==4 => ans = 0
 
(4-eps(4))==4
=>0
 
@AnderBiguri I cannot understand why you mentioned this fact
 
just to add
(4-eps)==4 is ovbious because the minimum floating point representable number is smaller than the minimum change that 4 can get as floating point number
if that sentence makes any sense
 
3:15 PM
@AnderBiguri flirp-ksst,tssjrt,peep!
 
@AnderBiguri why 0==-eps(0) => false ?
 
I still don't quite grasp floating point issues
 
basically, eps(10^16) -> 2
eps(number) is the numerical change that number will suffer if you change the less significant bit
eps without arguments -> the smallest possible floating point number representable
but, the bigger the number, the bigger the gap between numbers
 
I remember learning about all this stuff... Good thing I don't need to deal with it in "real life" ;)
 
@Dev-iL That's because eps(0) is the smallest denomalized number possible in the floating-point arithmetic, which is non-zero.
I'm assuming that since eps(0) is smaller than realmin.
 
3:23 PM
Alrighty!
 
actually
i fucked up the labels
 
@AnderBiguri I am just as convinced
 
basically this means: the more you increase your order of working numbers, i.e. : 10000000000*5000000000000 vs 1*5
 
figure();loglog(logspace(-100,100),eps(logspace(-100,100))); ?
 
the more the errors, or, the bigger the minimum number you can describe
for ii=-100:100;
   res(ii+101)=eps(10^ii);
end

loglog(10.^(-100:100),(res));
wich is probably the same thing
 
3:28 PM
@AnderBiguri Jay for loops!
 
How do you people post whole blocks of code in here??
 
@Dev-iL ctrl-c, ctrl-v select all, ctrl-k
 
classdef ImageBGPair < handle
  %IMAGEBGPAIR Is a class for storing a pairs of "scene" and "backgorund" for easy
  % association.
  %   Detailed explanation goes here
thanks!
 
@Dev-iL What do you mean you people. Racist!
 
@Ballbreaker Bearded physicists. Bunch of weirdos!
 
3:31 PM
 
Hehehee
@Adriaan Triple points if you're all three of those things
 
Project Euler 9
matl '1000;t!tt!Yybb+,1000-_=2#2$1f2$t+,1000w-,3$hSD'
 
I'm just a weird physicist...
 
@Ballbreaker I am the first and third, and whilst pretending to be the second, @AndrasDeak keeps telling me I'm not :p
 
@Ballbreaker {Ballbreaker , Bearded physicist, Bunch of weirdos}
 
3:33 PM
I suppose that would be four then, I separated bearded and physicist in my mind
brb meeting!
 
Project Euler 10 is very simple (and sorry, I'll stop for now) :-)
2e6YpsE
 
@LuisMendo do you use primes() ?
 
Yes! dirty trick :-)
2e6      % number literal
Yp       % prime numbers
s        % sum
E        % convert to string and display
 
nah, i did the same
 
Us cheaters :-D
 
3:36 PM
You guys know the joke about the dog that licks its balls?
 
... because he can? :-)
 
Yes.... I was just trying to come up with reasons for MATL
 
Hehehe
 
or Pyth etc.
(... I didn't mean to offend)
 
serious question: how would you guys deal with a lot of optional argumets to a function (when if the arguments its not given, a default is chosen). I have
oh damn formating
opts= {'Step','Dim','Savegif','Colormap','Clims'};
defaults= [ 1 , 1 , 1 , 1 , 1 ];


for ii=1:2:nVarargs
    ind=find(ismember(opts,varargin{ii}));
    if ~isempty(ind)
        defaults(ind)=0;
     end
end
for ii=1:length(opts)
       opt=opts{ii};
       default=defaults(ii);
       switch opt
               case opts(1):
               if default

............
basically, I have a huge sqitch case where I check every input if its given by the user, and decide to use default or not
but its ahuge bunch of code every time and looks ugly
 
3:43 PM
@AnderBiguri isn't that what MATLAB does as well?
 
I have no idea
maybe this is thte way to go
 
e.g. edit svmtemplate (I know this one to have a plethora of options)
or templateSVM, whatever it's called
 
hum in 2014b it has classes
 
@Dev-iL Of course! I can't even see how that could have sounded offensive
@AnderBiguri I think that's more or less what Matlab native functions do, except that I think they use nargin to check, rather than varargin
 
oh yeah, I have no idea why I did my own thing nVarargs = length(varargin);
wich I asume is exactly the same as nargin
ohhh, yes I know. Because I have some other mandatory intputs
so nVarargin!= nargin
instead of doing nargin-5 as 5 mandatory inputs to chek how many optionals are in
 
3:47 PM
hey Luis and all! :)
 
hey!
 
Why u no vectorize Ander! ;)
damn those loops, even though with cell arrays
 
Hey @Divakar! Check out some MATL examples above. Code golf is waiting for you :-P
Gotta go now, sorry
See you all!
 
ahh Luis!
okay catch you soon though!
 
@Divakar Run for your lives! Loops and children first!
 
3:49 PM
@Divakar I did write all that in a cafeine overdose
 
@Divakar :-D
 
code sucks. How would you vectorize that though?
 
yeah people these days code while sleeping ...
get rid of that switch first I guess Ander
 
the second one is "mandatory" I think, as I "pop" the next 2 input arguments and then goes to a switch
I dont know how XD That's why I asked here :P
Every optional input parameter works differently
some need to be strings, others arrays, others a numeric integer in a range etc
 
get the unique numeric IDs with the 3rd o/p of unique and then bsxfun the hell out of everything I guess.
IDs corresponding to the varargins and opts
 
3:54 PM
yeah that I can do. But I cant bsxfun things (well I probably can, but no idea how)
 
might not be pretty but you know, for the fun of it maybe
 
I mean, some of the checks are `if input is 1,2,3 or x y z then do this, else error
yeah Ill work on that
see if I can tidy it
 
but varargins could be any dimensional, right?
 
they are always 2, option name and value
each touple have different posibilities
kind of like plot arguments
'Linecolor', [2 3 4], 'linestyle', 'none', etc
 
To make it pretty I would suggest make groups of 2, that is reshape varargins into ([],2)
 
4:01 PM
I do that. uglily XD. In the sqich thing, I extract the next 2 into 2 variables. and use those
opt=opts{ii};
default=defaults(ii);
val=varargin{ninput*2};
 
or (2,[]) I think. So, the first row would be the option name and second row the corress values
 
Hello / Goodbye to whoever came or went while I was away for some food :) :P
 
I did! @Dev-iL
That's some discussion you guys had on closing the max related question.
 
@Divakar I saw :) Feeling like shutting down Dan's gold mine?
 
See if I got that right - If the function is func(varargin) and if you had as inputs - 'Linecolor', [2 3 4], 'linestyle', 'none', so opts would be varargin(1:2:end) and val the other half, right? @AnderBiguri
 
4:06 PM
func(a,b,c, varargin) but yeah
 
haha nah I think it's fine, his points/comments are borderline fair @Dev-iL :)
 
as I have a "library" the amount of mandatory inputs vary depending on the function. The way I have it now I can copy paste and change the option names and behaviour
 
and won't be pretty to close it again. Countries are already fighting it out in the real world, let's have peace on SO @Dev-iL
so separate out into opts and vals that way varargin(1:2:end) and varargin(2:2:end) and then use your loops maybe? Might be more "readable" too? @AnderBiguri
 
@Divakar thas basically what I do now
with ugly code
 
@Divakar Alright, it's not like burninating it has any practical implications :P
 
4:14 PM
I also hate how user created docs look like on MATLAB
its 2015, please let us create docs as cool as yours!
 
@AnderBiguri If you don't hate bsxfun, have a look - stackoverflow.com/questions/17090047/…
 
looks cool, but I need to do a difirenet thing for very input
nvm, I am managin ;) thanks for the help though
 
manargin maybe? :)
 
@AnderBiguri I think you can do that, when you publish
 
@Divakar LOL ;)
@Dev-iL it could be. I just want the F1 button to look cool
 
4:27 PM
@AnderBiguri noooo
eps() is eps(1)
the smallest is around eps(0)
 
paint that F1 button
 
@AndrasDeak oh, my bad
still the rest applies, rigth?
 
sure:)
 
@AnderBiguri It could be a nice Q&A on how to make MATLAB recognize user made help docs!
 
@Divakar put some little happy rascals here
 
4:29 PM
what do you mean, like babies? haha
 
@Adriaan lol I never imagined you to have a beard, probably because of your pink elephant
 
@AnderBiguri There's a way to do it for custom toolboxes, I think
 
hum yeah. I havent even looked at the "toolbox" thing. I am just like, putting files in some folders XD
 
lol he got beard? @AndrasDeak maybe there's a happy little elephant wandering around in that beard
 
@AnderBiguri has anyone suggested inputParser?
 
4:31 PM
@AnderBiguri - there we go! mathworks.com/help/matlab/matlab_prog/…
 
@Divakar one of his messages seemed to suggest that
 
@Divakar was trying to make a reference to Bob Ross
 
"I got beard, so listen to me and upvote me"? @AndrasDeak :)
 
@Dev-iL Oh nice! OH XML AAAAAAAAAHHHH. I will consider taking some time to do that
 
dunno who that is Ander!
 
4:33 PM
 
I'm so tempted to buy a TV today for Cyber Monday .. such good deals...
 
So his hair inspired that beard of yours, right? @AnderBiguri
 
I always find it hard to justify getting something when you have one that still works though...
 
@Ballbreaker dark-ish Monday?
@Divakar hahaha yes. Now the hair!
 
@AnderBiguri Yeah exactly hahaha
 
4:35 PM
@AnderBiguri Dark in the sense you sell your soul for a new TV
 
@Dev-iL what do you need the soulf for if you have a TV?
 
@AnderBiguri Especially if you use the TV as a computer screen
 
Indeed.
 
TV as in television? It's been ages seen one
 
lmao
 
4:37 PM
I hope @Ballbreaker is not talking about buyin a Total Variation regularizator.
 
I use my current TV for a secondary computer screen + playing my PS4
This one I'm looking at seems pretty good.. it's on sale right now for $599, where it's usually $899
 
urbandictionary says TV could mean "transvestite"
 
@AnderBiguri did you read my previous message above?:(
 
Now everybody should read the previous messages with this newfound meaning
 
@AndrasDeak nope. now I have
 
4:39 PM
Yeah its been ages seen one transvestite. I guess the next time I see a TV, I must watch a documentary on transvestites
 
@AnderBiguri the one starting with @AnderBiguri :P
 
s**t, that looks quite cool actually
 
How does one generate an image like that in MATLAB:
 
mask!
 
Yeah, looks like it
I wonder if they have code that does it
 
4:42 PM
@AnderBiguri yup. Here's where I learned about it:
2
A: How to parse optional inputs in MATLAB?

Brock HargreavesYou can use MATLAB's inputParser class: http://www.mathworks.com/help/matlab/ref/inputparser-class.html http://blogs.mathworks.com/community/2012/02/13/parsing-inputs/ EDIT: I guess I'll just put the code in as well... function y = f(x, extraOpts) p = inputParser; p.addRequired('x', @(...

of course it's mostly the doc
but it's already clear how cool it is
 
So, how come code-golf is a tag on the code-golf SE - codegolf.stackexchange.com/questions/tagged/code-golf. Aren't all questions there for golfing?
 
@Divakar some are puzzles
PP&CG
 
PP&CG?
 
Programing puzless and codegolf
 
yeah, sorry
 
4:44 PM
ah I see, makes sense!
 
@AndrasDeak You will see it soon in all its glory
I know you are expecting me to be a helpless 14 year old girl with a love for rocks, sorry to disappoint you.
@AndrasDeak where's that bulletpoint/code markdown mashup edit of yours?
 
@Adriaan Yeah I know this is you: c1.staticflickr.com/1/1/1201118_cd8526fc2d_b.jpg
@Adriaan shall I fix it?
 
@AndrasDeak You go girl
@AndrasDeak no glasses, poor sod
@AndrasDeak you could edit the numbered list to not be a numbered list as well though, judging it's not really necessary.
 
5:01 PM
Hi @beaker
 
Hallo @Dev-iL, Hallo all
 
@Adriaan nah I just codeblocked it
this is as good as I can get:
0
Q: Matlab: how to convert an fft signal in image

maryI would like to translate an FFT signal in image. Signal is contained in a vector. I found different solutions but I don't know which one is really correct. compute vector fft, translate it in a matrix, create image and show it Y = fft(y); %compute fft Y = fftshift(Y); %center fft Yabs = abs(Y)...

@beaker yo
 
Hey @beaker!
 
@AndrasDeak why the <\br>?
I think I get the rest
 
@Adriaan remove it and see:)
 
5:04 PM
@AndrasDeak Unclear what you're asking
 
sorry, still reading through Luis' MATL examples :D
 
@Dev-iL I didn't ask anything
 
indentation. Pfft. leaving worthless whitespace on the left
 
@Adriaan either numbered list + indented block, or neither
 
@AndrasDeak You edited it, from this point on, everything is your fault
 
5:05 PM
it doesn't make much sense to have them mixed
besides, I suspect that auto-increment is broken if you don't indent. But I'm too lazy to check
 
Also, that was a reference to how it should be flagged
 
@Dev-iL Let's downvote all that loser's posts!
 
@Dev-iL I don't see no flag:P
 
@Adriaan so he can get unsung hero?? Never!
 
I mean vote
 
5:06 PM
There...
 
much better
 
@Dev-iL well, he just has three working pieces of code and wants to know which is best. I guess it should be off-topic ->debugging or something, but not unclear
 
"which one is really correct." means that the real part of the FFT only should be correct, yes?
 
@Dev-iL I suggest an answer along those lines;D
 
@Adriaan should answer, since it's obviously clear to him what's being asked
 
5:10 PM
stackoverflow.com/questions/34003569/labelling-of-image -> this person is using exactly the same images as that abdc user
 
@AnderBiguri Interesting. Not a duplicate though
comment him the other question I guess
 
that's a very common image recognition picture
I've seen it a dozen times
 
neither were the questions of that other user, they were just annoying "do my work for me"
 
along the lines of "I'd like to separate the coordinates of the spinal discs, gimme teh codez"
 
@AndrasDeak aaah. thats why I asked. Is it part of a dataset or something?
 
5:12 PM
@AnderBiguri dunno
@AnderBiguri throw oi64.tinypic.com/1zyzorn.jpg into google image search
SO and researchgate results all around
 
I might have found the source: researchgate.net/post/…
or someone's using RG as a substitute for SO for generating code
 
hahaha
It migth be a research group or some master students or something like that
 
probably students
and the lecturer gave them the image
all google results come from after aug 2015
 
Any of you familiar with extracting Strange Attractors from one dimensional data sets?
we have LabView (yes, bloody LabView) "codes", which are actually just squares and triangles connected by lines, which are not very insightful
 
5:23 PM
@Adriaan You know you can have blocks in LV executing MATLAB code, right?
 
you need to clikc on those squares to see what they do xD
@Adriaan dont asnwer to thaaaaaaaaaaaaaaaaaaaaaaaaaaaaat
vote close duplicate
 
@AnderBiguri already deleted my answer as soon as the duplicate surfaced
 
:P
good
its the overrepating question
one of the most self-explanatory errors from MATLAB
 
@AnderBiguri exactly.
therefore I hoped for a +12 RTFM oneliner :P
 
hahaha
 
5:27 PM
what is it? negative/zero array index?
 
Should I reopen that for you? @Adriaan ;)
 
@AndrasDeak OP uses i=0 :(
@Divakar I can just undelete my answer and you can go upvote like crazy :P
@Divakar You could've at least used highlighting for the error message whilst editing :P
 
Or I can have some food
 
@Divakar just had dinner, thanks
 
Thanks for reminding!
 
5:53 PM
This place is hopping! I'll brb. Haven't been around because I've been working on that application.
 
Skype gives MATLAB ads o.0
 
@rayryeng an SO app to detect RTFM questions? Yay!
 
Hello!!!
 
hahaha, not surprising
@AnderBiguri which question?
 
nah just kidding ;)
 
5:57 PM
BTW, I answered a 2D FFT based question yesterday... wasn't expecting that it get 7 votes lol
There aren't even any images!
 
Could I ask you something? :/
 
only answers with pictures should get upvoted
 
SCREW YOU BUDDY
 
well my nice gif answer from today has only 3 upvotes
my " use diff()" has 7 :(
 

« first day (152 days earlier)      last day (3060 days later) »