« first day (352 days earlier)      last day (2893 days later) » 

5:26 AM
@Feeds Yeah, I almost lost my shit when I saw that post by Yair Altman.... Ctrl+C in MEX? That's great! @Dev-iL did you see that article?
@all sorry i haven't been around.... been buried in interviews. I'm back in California again. I have an interview with Apple tomorrow.
 
 
2 hours later…
7:15 AM
@rayryeng Got it in my email yesterday, it looked neat, though I don't use MEX almost at all (and when I do - it's code from FEX).. It should be interesting for @Amro and perhaps @AnderBiguri
 
7:33 AM
@Dev-iL I'll admit it has been a while, but there have been many a time in my PhD where I would write MEX and I'd have to kill MATLAB manually to stop the MEX file from running
 
 
2 hours later…
9:52 AM
@Dev-iL first thing I'll do on Monday will be triying (and timing) it
@LuisMendo yes someone did actually point put, I think n 2016b
 
10:09 AM
Btw guys, R2016b release notes: mathworks.com/help/pdf_doc/matlab/relnotes_pr.pdf
6
It's funny how that says "Confidential Prerelease Documentation — Subject to Nondisclosure Agreement"
 
10:35 AM
@Suever @excaza ^
 
10:59 AM
lol
I always thought they locked it behind a login to your MW account
 
@Dev-iL Awesomeness! That automatic expansion!
 
> If you have to explicitly use the legend handle or specify order, the code becomes more cumbersome to write. For quick uses as in my example the implicit functionality works just fine.
Yes, adding one line or another like 10 characters is super difficult
 
That's what you get for open-sourceing your codez....
@Divakar Make sure to star that message if you want others to see it too :P The pdf link will probably stay valid for future version as well ;)
 
> It's up to the user of legtools to make sure what the current figure and axes are.
wtf
 
11:14 AM
This is what one would call "introducing a bug" ^
 
I'm on like draft 4 of my response haha
 
Make sure to include references whenever you use the term "good practices"
 
11:46 AM
 
12:18 PM
@excaza about the last paragraph - I think it would be fair to mention some guidelines for how to write your code such that it will be accepted, saying "why do you insist I merge this - just maintain your own fork" is a bit douchy, as I would like to believe the guy genuinely tried to help
 
The guideline is to not get rid of the explicit object input, I think I've made that clear in a non-douchy way
And I don't see telling someone to maintain their own fork that's specific to their use case as douchy, it's the whole point of forks
 
afternoon
 
@AndrasDeak oi
 
@excaza "explicit is better than implicit"? In MATLAB?:D
 
in everything!
 
12:28 PM
For the non-python people: that is one of the Zen of Python
oh, which reminds me: I joined the Q&A club of @Dev-iL :D
my second question on SO
 
link?
 
It's python:
8
Q: How can I perform two-dimensional interpolation using scipy?

Andras Deak This Q&A is intended as a canonical(-ish) concerning two-dimensional (and multi-dimensional) interpolation using scipy. There are often questions concerning the basic syntax of various multidimensional interpolation methods, I hope to set these straight too. I have a set of scattered two-dim...

 
Holy ****; nice article you got there
 
thanks
I've been working on it for a week, on and off. Finished it last night today at half past 4 AM:D
 
12:30 PM
I was told that it's difficult to understand at first read, I wonder if I can make it clearer. A table of contents would help:P
@Adriaan :D new favourite of yours?
 
jup
 
re: the release notes
> string Array: Manipulate, compare, and store text data efficiently
???
aww thanks guys:)
 
can you add methods to MATLAB's built-in classes on the fly?
 
Reflection, you mean?
 
12:34 PM
as in double.newmethod=@(x)... ?
I'm pretty sure you can't
although I've never tried:P
MATLAB has static classes, yes?
unlike python where everything is just a name
 
@AndrasDeak not really static
you can't have static properties, as far as I remember
 
I have a couple methods that work on legends, can I add these methods to an existing legend object or do I need to create my own legend class?
 
can you modify class methods of instances?
 
only persistent, which is like the retarded brother of static
 
@excaza I'd guess that you have to subclass it
anyway it's cleaner that way
unless you put everything into a userdata or something:P
 
12:36 PM
@excaza If you manage to get the underlying Java object of legend, you can add stuff to that
@AndrasDeak I think you should add a couple more tags to your question, even if tangentially related, to get more points in tags :)
I have a feeling it will earn you loads of unicorn points + badges; might as well hack it a bit
 
Class 'testcode' is not an allowed subclass of class 'matlab.graphics.illustration.Legend'.
 
I don't really want to abuse it, I mostly want to hammer all the "why u no interpolate" kinds of questions with it (and yes, enjoy a bit of rep)
 
butts
 
Sealed?
or is matlab.graphics.illustration.Legend a java class?
 
it's p code
 
12:41 PM
looks like you need to decode it
 
sure, but distributing a class definition based on a decoded built-in pcode is not really what I want to do
Damn you MATLAB, I just want to make legend better
 
MATLAB is perfect as-is
 
@excaza would addprop help you in any way?
 
that sounds fun
 
perhaps we can hack it to also add methods
 
12:52 PM
function handles?
though sounds hacky as fuck
 
That sounds right up my alley ;)
 
this is silly, I get that they don't want you to mess with the built-in, but what's the issue with messing with your own copy of the built-in
 
yeah, I don't get it either
 
1:30 PM
posted on June 17, 2016 by Jiro Doke

Jiro's pick this week is Volumetric Data Explorer by my fellow MathWorker, Adam Filion.Volume visualization refers to a graphical representation of data sets defined on three dimensional grids. There are two types of volume data sets that MATLAB typically deals with - scalar and vector data. Scalar data contain scalar... read more >>

 
0
A: MATLAB-style terminal output in Python

abukajYes, it is possible. All you need to do is to subclass the dict class and provide your custom implementation of the __str__() method.

what a totally useful answer
 
@excaza I came up with some workaround that kinda does what you wanted:
function out = test1

A = matlab.graphics.illustration.Legend;
% mcLegend = ?matlab.graphics.illustration.Legend;
%% <this happens in your custom code>
addprop(A,'awesomeProp');
A.awesomeProp = @(hObj)struct(hObj);
%% <sometime later>
if isprop(A,'awesomeProp')
  %execute some code based on A.awesomeProp
  out = A.awesomeProp(A);
else
  %execute some default code
  out = [];
end
%%
keyboard;
 
@excaza "it's perfectly doable, if you do it"
 
@excaza haha yea I saw that
0
Q: How can i remove artifacts on stitched images

t.hichamI'm beginner in image processing. How can i remove the boundaries of the stitched images to get a performed panoramic image (using Matlab). why i get this difference between these images.

why does this person keep asking this crappy question?
 
because sooner or later he hopes to get his job done by somebody else
odds are he has already been repwhored in the past, giving him false impressions
 
1:37 PM
@Suever Maybe it has something to do with the following way of thinking:
 
there's also pretty much no way to do what he wants that I know of
 
@Dev-iL Why isn't anyone helping me? :( — Dang Manh Truong 11 hours ago
 
it's an exposure issue
unless you have RAW images I think you're borked
 
Histogram normalization-ish?
 
hmmm maybe
 
1:39 PM
the main issue is that they should do it themselves
 
haha right
 
it's either their job or their thesis
 
well and even if they made an effort, it's almost too specialized still
 
probably yes, and they didn't even make an effort
"I'm beginner in image processing" --> well then go learn it
 
hahah
 
1:50 PM
mornin gentlemen
and gentlewomen (@Adriaan)
 
hey ballsy
how's it hanging?
 
how goes it my man?
Slightly to the right!
But alright none the less haha, a little emotionally drained today but not too bad
yourself?
 
@ballBreaker afternoon chick
 
@ballBreaker so the usual?:P
I'm fine, thanks
 
> Thanks for your offer on continuing my own fork of legtools. What do you suggest for a name if I want to publish it on the MATLAB File Exchange? I could use ‘legtools’ or ‘legtools enhanced’, but both names are kind of unfair to the current legtools, don't you think?
 
1:54 PM
got to bad at 5 AM, got carried away with a Q&A post in python:D
@excaza are you trying to be mean?:D
 
how about legtools_plus_thingsnobodyneeds
 
@excaza extended (<= assuming you want to sound polite)
 
third_leg_tools
3
no wait, that should be third wheel
 
I like third leg
 
legtools_forked_borked
 
1:55 PM
I improved on the old one and he's improving on mine
 
the beauty of open source:P
 
legtools_mightnotdowhatyouwant
 
:D
legtools_excazahadnothingtodowithit
 
legtools_dangerous
 
55 minutes to transfer 1 gig over USB
I think I need a new laptop
 
2:02 PM
I'm guessing it's not 3.0?
 
It's 2.0, it still shouldn't take that long
 
Hi folks!
 
What's the cd C:\dir notation called?
as opposed to cd('C:\Dir')
 
@AndrasDeak hahah yeah bbasically
 
2:10 PM
@AndrasDeak I think third_leg and tools is a little redundant isn't it? ;)
 
I just learned that the other day
 
that's the one, thanks
 
from Suever or Luis, of course
Luis it is
 
It was Luis while he was playing with all the wonkyness of things like disp 'A':'Z'
I'm not sure if he ever came to the conclusion on that though, but basically ' is being treated as an escape character
so it's escaping the : and the Z
 
The behaviour of that is weird indeed
 
2:15 PM
which obviously just yields : and Z
 
disp 'A'':''Z' is even weirder isn't it?
 
hmmm that doesn't seem to yield anything strange for me on 2015b
A":"Z
oh wait are those '' not "
 
'' is double '
Yeah
:)
It yields A':'Z
 
Nah that's expected because the first ' in each group escapes the second one
 
Looks like the column is metal
 
2:19 PM
there the ' as an escape matters
 
Okya
Okay*
 
disp 'A''b'
I think that this is strange
disp A''Z
I'm not even sure what's happening there, looks like string concatenation
 
isn't '' interpreted as empty string in this case?
 
@BillBokeey it's an escape to display a single quote
 
2:32 PM
@BillBokeey Yes it actually is interpreted as an empty string in that last case
the displayed result is simply AZ
 
Is the syntax disp smthg even documented by the way?
 
yea anyhow. Lots of strangeness with that sort of syntax. Nevermind the headache that spaces introduce
Yea it's in that same link that Andras posted
 
2:51 PM
Oh by the way @Suever
Do you have ideas on how to do that? stackoverflow.com/q/37792418/4383032
Couldn't find anything that works
 
3:03 PM
@BillBokeey Nothing simple, that's for sure.
I have hacked the FEX inpolyhedron to do this before
because it finds the intersection of a ray with all faces of a mesh
 
I tried using the same idea I used there stackoverflow.com/questions/37717543/… but as the patches are not convex it's not working
So it bugs me :D
Did you post it on FEX?
I'd be interested in seeing it
Hmm
Problem with the mesh
In the non-convex case
the mesh will be nonsense won't it be?
 
I didn't post it and it's buried inside of our groups code now haha
 
haha
 
(nerds)
 
Does inpolyhedron work for a surface mesh in a 3D space?
 
3:10 PM
yea it's definitely more complicated for non-convex, it's pretty poorly defined
yea that's precisely what it does
 
Oh nice
 
wait
yes
 
Because
 
it's actually solely for surface meshes I believe
 
For OP problem
I was able to generate a good surface mesh by projecting the points on a plan
Mesh the projection
 
3:11 PM
That awkward moment when you end up working through a bug buried in a GH pull request like it's a SO question
 
And then unproject it back
But then I was stuck ^^
 
I spent like a half hour reading the source for legend
 
I think projection to 2D can be a little difficult
for irregular meshes
 
@Suever are you by any chance trying to answer the gmail question?
 
nah
it's a java certificate issue
I hate certificates. They are voodoo.
 
3:19 PM
:)
 
At least I'm 99% sure that's the issue
They likely need to add the cert to the MATLAB-specific keystore
 
java is voodoo :p
 
^^
@excaza Nice response on the leg_tools issue
 
every time I look at MATLAB's source I'm a strange mix of impressed, scared, and sad
especially for really old stuff
if ~allLegendable
    % @TODO - message catalog
    error(message('MATLAB:legend:ObjectsNotLegendable'));
end
:D
 
You'd think production code wouldn't have too many TODOs remaining
 
3:35 PM
maybe that's why they obfuscate and compile so much of it
not for speed/security, but to hide the TODOs
 
Now I'm tempted to grep -R '@TODO' everything
 
hahaha please do
case insensitive, they have some lowercased ones too
 
<!--@todo Yes, that's a pretty stupid msgid, but that's what the old code used. Consider changing it. -->
    <entry key="hgError">{0} cannot be a child of {1}.</entry>
 
LOL
really?
not as many as I thought
but those are funny
%@TODO what if currCell is itself a cell reference?
that's deep
 
hahaha
 
3:47 PM
 
4:12 PM
dammit
I left my data recorder on
now I have to go through 230 CSV files to see which one actually has my data on it
 
4:24 PM
How do I see what version of Apache Commons Compress MATLAB is using?
For others: MATLAB's unzip uses java under the hood, and the exception for file sizes > 4 gigs comes from the org.apache.tools.zip.ZipFile call, which is inside a try/catch block. — excaza 1 min ago
 
looks like 1.8.1 in 2015b
I just had to extract the MANIFEST from the jar at java/jarext/commons-compress.jar
 
if only I knew how to java
daniel's answer is pretty useless
 
4:41 PM
more useless than a link-only answer sadly
 
where's our resident java nerd when you need him
 
o hay
You rang?
 
gimme codez
 
I don't understand what I'm giving codez forz
 
All the codez.
 
4:48 PM
Java exception occurred:  java.io.IOException: central directory is empty, can't expand corrupt archive.
 	at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:329)
 	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:186)
 	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:163)
 	at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:124)
it's not corrupt :|
 
Do you have the code for that method?
I can't really determine what it is just based off the exception stack haha
 
   % Create a Java file of the ZIP filename.
   zipJavaFile  = java.io.File(zipFilename);

   % Create a Java ZipFile and validate it.
   zipFile = org.apache.tools.zip.ZipFile(zipJavaFile);

   % Extract the entries from the ZipFile.
   entries = zipFile.getEntries;
with a 5 gig file
works fine with a 1 KB file
unfortunately that's all MATLAB gives me for the exception
 
Hmmm that seems like a strange thing
is that documented in the apache docs?
 
5:06 PM
@excaza zipFile = org.apache.tools.zip.ZipFile(zipJavaFile); is what fails
 
5:19 PM
0
Q: Selecting Some Members from a Matrix in MATLAB

ImanLet's assume: R = [1 2 3; ... 4 5 6; ... 7 8 9; ... ]; How I can pick only three members from it: R(1,1) , R(1,3) and R(3,3) It means I am looking for B = 1 7 9

lol
 
@excaza: :) surely you can extrapolate the 3x3 example to the set of all possible matrices
 
he probably wants sub2ind
 
@excaza Love your response
Yea looks like a sub2ind
 
well it wasn't a loop :p
 
oh boy, here we go. How many iterations is this going to take?
 
5:26 PM
I did already
yea should have just marked as a dupe and moved on
at first it wasn't clear how he was selecting crap
This explains everything:
> PhD Researcher in Civil Engineering.
 
drops mic
 
@Suever I hope you're just mocking Civils with that line.
 
Definitely. I'm an engineer so I can't mock the whole field
Just the ones who play with concrete
 
major highways with only 2 lanes in each direction are proof civil engineers only have air in between their ears
 
Does anyone know how to use print or similar function to get a PNG that is similar to what you'd get for -tight with an EPS? i.e. clips the non-axes portions of the figure
must be octave-compatible
 
5:34 PM
> Starting in R2016a, the size of printed and saved figures match the size of the figure on the screen by default.
o.O
wat
 
oh thank goodness
that was always so annoying to me
 
@excaza They finally fixed that crap? Awesome.
 
I'm back
 
set(gcf, 'PaperPositionMode', blahblahblah)
 
random link is SOCVR by Braiam, and who's chatting there?
 
5:35 PM
jesus
Masi feverishly executing random commands on linux scares me
 
I'd laugh but that's pretty much how I use linux
 
OK that's hilarious actually, that dude gave him the code to remove him from the sudo group
So now he can't do anything else...
 
@Suever Maybe that's a good idea.
 
rofl
 
in /dev/chat on The Stack Exchange Network Chat, May 7 at 13:37, by terdon
Shit. Sorry @Masi, I posted too fast. OK, is this your own computer? Can you boot a live session?
 
5:38 PM
lol:D
didn't read all the way, just wanted to share the familiar name with you
I knew you'd appreciate it:D
this is funny because the good posts of Masi from 2009 or so are unix-related, unless I'm mistaken
 
that's not the same Masi, is it?
 
I think he's a troll. Read down through the comments.
 
Fast, interactive Linux support could never go wrong ... ever. Especially if you're using our Lord and Savor systemd.
 
like it just gets more and more convoluted
 
1
A: Selecting Some Members from a Matrix in MATLAB

OsJoeR = [1 2 3; 4 5 6; 7 8 9]; % Your matrix C = R(:); % This creates a one-column vector (renamed to C) for indexing B = C([1,3,9],1) % Use the indices (original col*original row) as row indices

upvoted...
why
 
5:40 PM
hehe, you have competition on that one, @Suever
 
@excaza
oh wait
that's what you linked hahah
 
> % Use the indices (original col*original row) as row indices
that's...not how it works
 
hahaha so many things wrong there
@excaza OK. I will remove it. Thanks though for your response and time <3 — Iman 1 min ago
did he just put a heart in there?
 
aww
 
He should at least give you a bounty first.
 
5:48 PM
also why is he responding to me
 
haha no clue
easily frazzled
 
user image
2
B = R([1,3,9]) % indices
he changed it
-.-
do you get rep for accepting?
I don't even remember how to SO
 
yea I think it's +2
I actually accepted one yesterday!
 

« first day (352 days earlier)      last day (2893 days later) »