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

6:00 PM
it all depends on what people can understand
my answer basically was talking about how to scale the magnitude spectrum. The guy was getting an entirely "blank" image when showing it, which was due to having all magnitude components > 1.
so imshow shows this as being white.
 
@AnderBiguri Put a bounty on it for visibility ;)
 
the simple answer is to apply a log(1 + ...) to the magnitude, then rescale to [0,1].
got 7 upvotes ll
 
@excaza nah I just did a nice gif :P
 
@AnderBiguri where is that question?
 
Project Euler 12: not very time-efficient but hey, 25 bytes :-)

>> tic, matl '1tT`w1+tb+ttX^;\~z250>~]E', toc
76576500
Elapsed time is 29.278339 seconds.
 
6:01 PM
lol, this title
0
Q: How to find the point in limited boundary ? You probably do not understand the title, please read the index

Ender A. RencüzoğullarıI have this code; for k1 = 1:length(X) for k2 = 1:length(X_inv) DE(k1,k2) = hypot(X(k1)-X_inv(k2), Y(k1)-Y_inv(k2)); % Euclidean Distance end end It works for finding distances from one point to anothers between [X Y] (X,Y give the position of points)...

 
3
A: Creating a 3D plot in Matlab

Ander BiguriYour code is wrong, as grassvector(t)=A; can not be executed, as the sizes are not consistent. However, I think you may want to do: grassvector=zeros([size(Ggrid),endloop]); and in the loop: grassvector(:,:,t)=A; Also, while completely unnecesary computationally, you may want to initialize...

 
@excaza because of the title, I didn't bother reading the question lol
I was gonna leave a comment saying
didn't understand title -> didn't read question.
 
We have the equation u_t+2u_x=0 with the initial condition
 
@LuisMendo doing PE now eh?
 
and periodic boundary condition.
 
6:03 PM
"I cannot upload the image, so I put it on twitter"
wat
 
The boundary conditions mean that u(t,a)=u(t,b).
But how can we write this in matlab?
 
@excaza yeah SO got rid of that restriction now
you can upload, but you can't embed images in your post
so I'm not sure what the person is talking about
 
@rayryeng Only the easy ones. To try out MATL a bit :-)
 
@Adriaan You have ads in Skype? Really?? community.skype.com/t5/Windows-desktop-client/…
 
:D that's a good idea.
I'll catch up with the room conversation in a second. I'm just finalizing my application
@LuisMendo I finally finished. Just reviewing.
 
6:05 PM
@rayryeng Great! Good luck!
 
The research statement was the biggest pain in my backside. It took 2 days to write, and it was only 5 pages lol
thanks!
 
@evinda wht do you mean "how to write this in MATLAB" ? depends what you are doing Xd
 
@AnderBiguri I want to implement the upwind method
 
@rayryeng Actually it was @David's idea :-)
14 hours ago, by David
@LuisMendo these might be good MATL examples, the first few Project Euler problems. 1: 0,999;"@3\~@5\~|@*+]D 2: 0,1,2T``t2\~?t4$b+bb]tb+t4e6<]bD (I don't like all the stack fiddling though) 3: 600851475143YfX>D 4: 99,900;+tXgRt0>)wRt0>)*SPY)!"@YstP=?@DX}]] 5: 1,20;"@Zm]D. I didn't try and be too clever with the algorithms, and the code might be a bit poor, but hopefully they are helpful as starting points.
 
I am looking for the approximation of the solution @AnderBiguri
 
6:07 PM
@excaza "You're stupid, help me!"
 
Congrats. @evinda . But that doesn't clear anything. The boundary conditions mean: "whenever you need to access a value outside the boundary, do this". So, in whatever thing you are doing, if you need to access something out of bounds (out of [a b]) do it as the boundary conditions say
 
@evinda lol
@evinda that question saying "how to write this in matlab" --> consider yourself downvoted and flagged as "too broad"
the only reason we (well, at least I) have been putting up with your excessive interrogative attempts here is that you had working pieces of code and relatively specific questions about it
 
:D Glad to see David is workign on those.
 
coming here (to chat!) and asking about "how do I solve this PDE" is nonsense
and rude
 
I should clarify that this works because "triangle numbers" (as defined in Project Euler 12) are of the form (n+1)*n/2, and thus are guaranteed not to be perfect squares:
8 mins ago, by Luis Mendo
Project Euler 12: not very time-efficient but hey, 25 bytes :-)

>> tic, matl '1tT`w1+tb+ttX^;\~z250>~]E', toc
76576500
Elapsed time is 29.278339 seconds.
 
6:10 PM
yes very good :)
 
@AndrasDeak at least have the decency to send him an email!
 
@evinda I would consider asking a question on StackOverflow.
 
@rayryeng no no no
@rayryeng you would first consider trying to solve the problem
and when you have a buggy piece of code, then asking a question
 
@evinda you shouldn't ask that stuff here. It's too broad.
Chat is reserved for topics that don't necessarily fall along the lines of an actual question.
 
@Dev-iL COOL. Thanks a bunch! I'd been receiving "ActiveX" errors since I had adblockers in all my browsers which basically did the same thing, but apparently Skype circumvented that
 
6:11 PM
It would also be fruitful to show what you tried too so you don't get flagged as being too broad.
 
much better:P
have a cookie, @rayryeng
 
fuck you
:)
 
@rayryeng I hope to see you soon at that too. When you have time of course! :-) And we have to get @Divakar involved too!
 
@LuisMendo The day he code golfs is the day I start using loops :D
@AndrasDeak it better be a chocolate chip cookie!
 
6:14 PM
ask him to vectorize
matl '1tT`w1+tb+ttX^;\~z250>~]E'
he won't be able to resist;)
 
haha :D
 
People, how would you double the size of a 3D image/matrix? Using any ype of interpolation. But the most memory efficient way?
because iterp3 requires creating x y z that occupy a lot if size(x)==512^2 for example
 
@AnderBiguri is this a well-defined problem? doubling the size
 
@evinda In cadence with what others have said, I'm going to avoid flooding the chat problem discusses anymore as well. That said, Wikipedia has a nice, concise article on upwinding for your 1D advection problem. Read it, and try to implement it; it's the best way to learn.
 
you mean upsampling?
 
6:15 PM
mmm not doubling actually. Just resizing
hum Imigh have to do with interp3
 
@AnderBiguri interp3 is the best way IMHO.
 
@AndrasDeak but yeah, what about upsampling
@rayryeng but, if my images are 1024^3
 
ohhh.
 
thats 8Gbx4 memory
 
@AnderBiguri then you're screwed...?
 
6:16 PM
I mean I could handle it
but there can be some other way maybe?
 
Well you could iterate over all voxels.
 
or... use a loop:O
 
if you don't want to create the initial mesh grid.
 
it's either memory OR loop
 
but loop is nice here
 
6:17 PM
yeah Andras is right. You have to choose between one or another.
 
or bsxfun?
 
bsxfun is very memory heavy.
 
yeah
memory vs cpu time
vector vs loop
they kinda go that way
if you can't spare any memory, you have to do everything by hand
 
so, you recon better for XY-> interp2. for XZ-> interp2 ?
 
6:18 PM
you could split it up yes.
 
but this is not the same result, is it?
 
no, I was about to say that you have to assume some independence conditions
 
hum
what baout some scaling functions of some sort?
hum thats going back to the for loops
for xyz interp
 
what kind of interpolation are you after?
 
actually it doestn matter XD
 
6:20 PM
nearest neighbour is the easiest. Just duplicate each slice
 
I think linear would do the better job, but knn would also prob
 
your'e using knn?
 
@rayryeng but is it? Then the image is shifted!
by voxel/2
 
yeah SIFT that feature point
 
@rayryeng Don't say that! Or he won't start :-)

His `bsxfun` answers are a bit code golfing, in a way
 
6:21 PM
BOOM
 
@rayryeng :P
 
allllright. Submitted
That took almost two weeks.
I haven't been around because I was applying for an academic position.... application is in now. Let's hope for the best.
 
good luck
 
@AnderBiguri So if we use forward difference for the approximation of u_t and backward difference for the approximation of u_x we just use the boundary condition for the calculation of u(Nt,x) given that there are Nt+1 points of discretizzation of t, right?
 
@rayryeng Good luck, and keep us informed!
 
6:23 PM
I certainly will!
@LuisMendo My wife edited most of my grammar and rewrote a lot of things lol. I am in good hands
however, the research statement took the most creativity... I had to really think hard about what to write.
 
:-)
 
especially with regards to what I wanted to research
 
@rayryeng But you mentioned she's Italian?
 
I narrowed it down to two fields: Computer Vision and Big Data, and Distributed and Omnipresent Computer Vision
 
Weird, is anyone else unable to view the workspace if a breakpoint is placed in the callback function here: stackoverflow.com/questions/34004531
 
6:24 PM
@LuisMendo yes, but she is second generation Canadian.
 
@evinda you use boundary conditions where you need to acces boundary data. I am not an expert on PDEs, but thats your answer.
 
her parents were born in Canada.
 
Works in R2014a but I get a blank workspace in R2015b
 
@LuisMendo it's actually really funny.... she got a degree in English Literature from the university I applied to lol.
 
@rayryeng I see. So native speaker of English
 
6:25 PM
correct. I am as well.
I'm first generation.
 
@rayryeng Yeah, that I knew :-)
 
oh :D
 
Yeah. You are not anymore Vietnameese or Italian! :P
 
SHADDDUPPPP :P
 
you have it in you maybe, but you are Canadians!
 
6:25 PM
Ok Mr. Basque.
 
hahhaa
 
@rayryeng I'm n-th generation Spanish... don't know n but very large :-D
 
same here XD
 
i'm 2nd generation muppet
 
@beaker Hahahaha
LOL
 
6:26 PM
My guess is n->Inf
 
get einsum in MATL!
 
oh God, then MATL will become a beast ll
lol
 
Go code golfing!! @Divakar
 
which is multidmensional matrixmul
go MATL! ;)
But tell me how far is it now?
 
@Divakar But then it wouldn't be like Matlab anymore...
read: I'm too lazy to impolement that
:-P
 
6:31 PM
yeah it would be like MATLAB PRO!
 
@Divakar There's a spec and a functioning compiler
You need R2015b to run it
 
ah damn!
 
Details are being polished
 
is that a compulsory requirement?
 
Hahaha
 
6:32 PM
@LuisMendo I'd like to try and make it compatible for lower versions
 
don't have that
 
It's compulsory for you to start golfing! :-P
 
At least R2014 or higher.
 
It should work in reasonably recent versions
 
actually, didn't @AndrasDeak get this working on R2013 on Linux?
 
6:32 PM
I have 2012A on linux and 2015A on win
 
@LuisMendo you made a call to repelem right?
 
@AndrasDeak tried in R2012 and it more or less works
 
I haven't tried the interpreter yet
 
@rayryeng Yep. But just don't use that MATL function
 
haven't had the time... Unversity application.
 
6:33 PM
awesome, so I can try too ...when Luis starts with Python ;)
 
@LuisMendo could repelem be replicated using the SO posts we've seen? kron, repmat etc?
Or do you use it in some exotic way?
 
@rayryeng I know. Catch up when you can!
 
@Divakar :D.
@Divakar I just submitted the university Application. I Duy'ed it!
 
@rayryeng Sure! But there's also histcounts. That's trickier
 
alright I will give it a go on my MATLAB 2015A on windows
 
6:34 PM
ohhh... yes. I may have to rewrite that too... or try and use histc or something
 
@Divakar Yes, it should work there, except for very specific functions
 
I would really prefer 2012A though for my linux, as I am not on windows much these days. So, I guess I will start on 2012A one and see how it goes.
 
@rayryeng I added the predefined strings too ('stable', 'rows' etc). It's close to finished
 
That's wicked.
 
It works on Linux, right?
 
6:36 PM
@Divakar yes. Andras got it to run
we had to fix a few bugs here and there...
i.e. usunix :P
 
awesome
whats that??
 
Luis used usunix instead of isunix... a typo
 
@Divakar Tell me any problems you find, perhaps they can be fixed
@rayryeng Exactly
 
but that branch of logic never executed because he was on Windows :P
 
ah and whats that command for?
 
6:37 PM
it checks if you are running Linux as your OS
 
@rayryeng Yeah... very funny typo
 
which is obviously false for Luis :P
 
@Divakar It's part of the compiler, not of the compiled code
 
ah right!
 
I used it to decide which linebreak flavour to use in generated files, if I remember correctly
 
6:39 PM
and you guys putting it on CG SE?
 
Not yet. I want to test it a bit more here
 
Like a proposal/testing?
 
But hopefully soon!
 
hmm makes sense
 
yeah not yet @Divakar - It's still being worked out
 
6:40 PM
yeah on christmas maybe, boom MATL 1 byte! :D
 
but it's almost there. I'd finally like to give Pyth and CJam a run for their money
:D
the challenge should be show a christmas tree
have MATL build that in.
 
haha good idea Ray!
some imag proc. challenges Ray!
 
Or you could change it so that it shows a picture of your hero :P
show Divakar's avatar in 1 byte
 
So we can use IP and other toolboxes on it?
haha
 
Right now no. Luis figured that image processing challenges are scarce in Code Golf
I think he will put functionalities for showing images though
 
6:41 PM
hmm ok
 
I haven't seen many IP challenges either... only two since I became a member
 
no sockets? :'(
 
@rayryeng fingers crossed:)
 
oh, the OTHER ip... ;)
 
@AndrasDeak thanks sir :)
 
6:42 PM
Can someone try this gist and let me know what is in the workspace window when the debugger is entered?
With MATLAB version
 
@AnderBiguri you could also go around with loops and do the interpolation by hand, only with small amount of points at a time.
 
I get this with R2015b, blank
 
@AndrasDeak ill try interp3 approach. If things go ugly Ill chagne
 
The behavior is not repeatable in R2014a
 
@LuisMendo indeed @rayryeng I'm on R2012b, and I've already run into some deficiencies
 
6:45 PM
@AndrasDeak how bad are they? Are they easily fixable with a few character strokes?
 
@rayryeng unless you define the new matlab functions, then no:D
like flip
 
@AndrasDeak Upgrade now!! :-P
 
or isprime(x) with x>2^32
 
@rayryeng And if there are some, they'll probably forbid too specific functions
There are imread, image, colormap. The basic ones
Also conv2
 
imread uses the IPT, so we can remove that
you can very well use imagesc or image to do what you need
 
6:47 PM
@rayryeng What do you mean? remove imread?
 
I would say make sure MATL only uses core functions. No reliance on secondary toolboxes to maximize compatibility with all who run it
remove as in don't put it as part of the MATL interpreter.
 
@rayryeng Hm. But that leaves out many interesting functions
 
does it?
ok! never mind lol
 
pdist for example. To me that's basic
 
ahhh... yeah
ok... well if you're going to use Statistics... please include some DIP functions too :D
Divakar and myself will be very happy people
 
6:49 PM
yeah go IP!
 
something that may be of interest is ordfilt2.
 
@excaza...this code doesn't do anything for me besides plotting
and it doesn't trip the breakpoint
 
Probably one of the most useful functions that is part of that toolbox
 
what is up with that?
R2012b
 
@rayryeng We talked about that, maybe add tow or three basic ones. It was your task to choose them :-P
 
6:49 PM
oh yes :) sorry
I've been very busy with this application. I will starting tonight
 
@rayryeng :-P
 
I apologize for my tardiness.
 
No! You've been busy
 
haha right :) thanks
 
No hurry at all
 
6:49 PM
ok :)
 
Ansd they can always be added later
 
where you applying Prof. Ray?
 
a new version of the language
 
York University
 
Nice!
 
6:50 PM
What can't be done is remove or change. Adding is fine
 
@excaza nevermind I added a datacursor
 
I'm applying to the Electrical Engineering department - Computer Science focux
 
@excaza I see input1 and input2 in the workspace in R2012b
 
priority hiring is in Big Data, Machine Learning and Computer Vision
 
@AndrasDeak oops, forgot to mention that
 
6:51 PM
checkmark, checkmark, checkmark.
 
I didn't include much linear algebra (QR, LU, SVD etc) for the same reason. Too specific
 
I'm a bit intimidated though. Their computer vision faculty is some of the best I've ever seen
The chair is a well known researcher in Computer Vision
In fact, he was one of my defence committee members during my Masters.
Basically... you know about Iris Recognition?
He was one of the original forefathers to get that off of the ground
 
@beaker There's urlread, for that matter :-)
@rayryeng That sounds great
 
Luis, maybe we should do a RLE on the fields in which CG questions are asked. For the fields, the tags could be searched. Just a very broad idea to make MTL a winner and popular.
 
@Divakar RLE?
 
6:53 PM
Run length encoding
 
Run Length Encoding?
 
Obviously nor run-lenght encoding :-)
 
I THOUGHT IT WAS
 
Oh!
Hahah
Then I'm lost
 
I have no idea lol
 
6:54 PM
Hmm, you should be in good hands then Ray or should I say good eyes(Iris), if you get there in York, hopefully you will.
I don't know even know what kinda tags they use in CG SE
 
Not many, really
It's not like in SO
 
ah then nvm I guess
 
Tags just say CG or PP, not much
 
doesn't convey much info you know
 
Look, an IP one:
11
Q: Count the number of sides on a polygon

flawrCount the number of sides on a polygon The polygon-side-counting robot has decided to travel the world without telling anyone before, but it is crucial that the process of polygon counting is not stopped for too long. So you have following task: Given a black and white image of a polygon, your p...

 
6:56 PM
But text/string/ascii based ones seem quite popular, right?
 

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