« first day (510 days earlier)      last day (2712 days later) » 

1:23 AM
@rayryeng Today I recommended that wonderful LICEcap you recommended to me :-)
in The Nineteenth Byte on The Stack Exchange Network Chat, 1 hour ago, by Luis Mendo
@Maltysen Ray Ryeng from the Matlab chat room recommended it to me
Pity that there seems to be no Linux version
If you'll excuse my self-promotion: wanna see some cool graphs?
1
A: Draw a Dragon Curve

Luis MendoMATL, 26 bytes 0J1_h9:"tPJ*h]hYsXG15Y01ZG If different scales in the two axes are accepted, the code can be reduced to 19 bytes: 0J1_h9:"tPJ*h]hYsXG15Y01ZG The figures below correspond to the equal-scale (26-byte) version. The code above produces the 9-th (0-based) iteration, that is, the ...

 
1:42 AM
@LuisMendo Yes no Linux version :( Glad you recommended it!
For now only Windows and Mac OS. There are other tools though in Linux...
 
 
7 hours later…
 
1 hour later…
9:42 AM
CV'd
 
10:34 AM
Are you guys familiar with this gentleman? I don't remember seeing him around, yet he's got a golden badge...
 
Yes, he comments quite a lot
he is relatively active at times
 
11:34 AM
This is ingenious. A program that outputs 1, 2, 3 or 4 depending on how many times its source code has been rotated
@Dev-iL Yes, I've seen him around. He's not very active lately
 
12:22 PM
@LuisMendo That's cheating. The question says you shouldn't use comments.
 
12:36 PM
"How can I load the variables in 'scan_line_attributes' using ncread?" This seems to be well-explained by the ncread documentation. — TroyHaskin 3 mins ago
I mean ... really?
 
@Dev-iL Oh, I hadn't read the question through. And now I can't remove the upvote..
 
@LuisMendo That has to be one of the deadly sins of SO :D
 
edit and unupvote...
 
@LuisMendo That's real cool. The second one reminds me of a Julia Set member.
 
@Suever @excaza (and whoever cares > eps about MATLAB OOP) - is there a non-hacky way you can think of to answer this? Looks like some is in order :)
 
1:06 PM
Yes, I'm relatively active when I stop caring about my job :-p
Nah, let's call it personal reasons. I'm stuck with MATLAB R2010a on my job, and at home I have 0 time to do hobby MATLAB projects...guess I just felt like my MATLAB skills were getting outdated.
 
Hey, @Rody. You're not usually seen around these parts, are you?:)
 
Turns out, that is male bovine excrement.
Nope. Let's change that :)
 
welcome!:)
 
Anyone see my answer to this question? Feels like there should be a function similar to imresize for polar/toroidal images...
 
'fternoon gentlemen
 
1:14 PM
@RodyOldenhuis I'm not familiar with the subject, and anyway I find OP's "interpolate my image without interpolation" attitude off-putting:P
 
gah he just wants to speed up his attempts with TriScatterInterp et al.
 
potayto, potahto:P
 
More like, What the client thinks s/he wants, vs. what s/he actually needs
 
this one? ^ :D
 
yup
But on SO there's ideally only the first and last frame :)
Sadly, most people describe it like the documentation tree
 
1:21 PM
yup...
 
@RodyOldenhuis Welcome, glad to see you've accepted my invitation to our elite club ;)
 
Thanks, but you should know, I'm fiercely anti-elitarian :)
 
j/k... nothing says "I don't want to be renowned from my programming skills" like having as your main tag :)
 
@Dev-iL
 
@Adriaan I meant the scarcity of unicorm points in our tag
 
1:45 PM
@Adriaan Isn't hating on PHP out-of-vogue yet?
So many problems are fixed just by using === and knowing what you're doing.
With that second one being the problem in 99% of other languages, too.
 
1:57 PM
@AndrasDeak :-P
@TroyHaskin Thanks! Yes, it has a fractal feel...
@RodyOldenhuis Well said! :-)
 
 
3 hours later…
4:54 PM
I can't find the doc reference that for k = 1:10 doesn't actually create the vector 1:10. Anyone?
 
@LuisMendo doesn't it?
 
Found it. It's in help for (not on the web)
Long loops are more memory efficient when the colon expression appears
    in the for statement since the index vector is never created.
@Adriaan Try for x = 1:inf, x, end. It works :-)
 
hmkay.
I seldom create the index vector for for loops anyway, only when I need that thing for specific other applications
 
@Adriaan Based on Luis' timings you probably should.
finally got caught up with yesterday's sumo highlights... had to wait for it to show up on video on demand :/
 
@beaker oh, I meant I usually do for 1:numel(X), because my X rarely contains integers
 
5:01 PM
ah
 
I thought you meant what Luis' has as third option
 
no, I would use the first option normally, but I guess I'll have to change to the second
 
The idea is that for k = 1:n is faster than nn = 1:n; for k = nn
The colon is treated specially there. No vector created
This reminds me of how colon is also treated specially in indexing
 
I wonder if the same is true for range iterators in other languages
 
@beaker for languages where an optimizing (JIT) compiler translates your code to machine or bytecode language (e.g., Fortran, C, C++, Java, Python, ...), usually yes.
But as always, hard to make general statements about this
 
5:14 PM
@RodyOldenhuis It seems that the parameter-passing mechanism should have a lot to do with it, too.
Passing an iterator reference to an object is going to be less intensive than copying the whole array first.
 
5:36 PM
^ Sorry, nonsense
 
hehehe
 
Sorry for the void ping :-)
 
 
1 hour later…
6:53 PM
this as dupe (see close vote for target)
 
 
1 hour later…
8:18 PM
moderator election results are in Aaron Hall, deceze and Bhargav Rao were elected.
 
I got 2 out of 3 right :)
 
I got 0/3
 
Didn't vote?
 
of course I did
Cerberus, Andy, Art
 
Now it's time to make SO great again!
 
8:48 PM
0
Q: Matlab digraph Shortest Cycle

Daniel FrischMatlab's recent support for Graph and Network Algorithms allows to get all the distances from any vertex to any vertex of a graph in big one matrix — by calling the function distances on a digraph object. On its diagonal this matrix is zero though. So how can I get the shortest path from any ve...

This confuses me
am I missing why it's complicated?
or why it necessitates a QA
 
this is actually kind of clever
it's equivalent to running the next step of Dijkstra's for each vertex to itself
@excaza the reason it's a bit complicated is that distances does not return distances from one vertex to itself, and taking powers of the adjacency matrix assumes that the weight of each edge is 1
of course, this will only work on digraphs. it will fail horribly for undirected graphs.
 
9:04 PM
Stupid generality.
 
@excaza I guess this person thinks they stumbled upon a way to get easy score on SO.. We've already dupehammered one of his Q&As a few hours ago
I tend to say that this question is either TB or unclear
Seems like one of those "I have an answer, now I need to come up with a question that makes sense for it".... that backfired
 
9:23 PM
@Dev-iL I dunno... "find the shortest cycles in a digraph" seems pretty clear... there's even some research shown because they used distances and it didn't give them the desired results.
 
10:09 PM
Oh, I didn't think about a weighted graph
Oh well
 
who upvoted a code-only self-answer?
 
@AndrasDeak I did :)
 
shame on you:P
 
because I have a soft spot for graph theory and it's well-commented
 
yeah, shame on you
 
10:15 PM
::shrug:: does what it says on the tin
 
Is a test for a permuted triangular matrix just n=size(A,1); tf = all((1:n).' == sort(sum(A~=0,2)))?
 
no
what if the bottom right element was swapped with the bottom left 0?
oh, that's a permuted triangular matrix
then yes?:D
 
this assumes that it is a full triangular matrix with no 0 entries in the triangular portion, right?
 
I think so, yes
 
1 2 3 4
0 3 0 3
0 0 9 9
0 0 0 2
would not be allowed
but otherwise, it looks convincing
 
10:26 PM
bedtime
good night
 
g'nite @Adriaan
time for sumo highlights
 
Night.
@beaker I had not considered that.
I guess the matrix needs to be sorted (or at least considered row-by-row) and then the consecutive zero-structure examined for robustness.
 

« first day (510 days earlier)      last day (2712 days later) »