« first day (643 days earlier)      last day (2589 days later) » 

5:08 AM
Different programming languages are different! #NewsAt11
-2
Q: Why % is giving different answers in different programing languages

SHIVA GOPIwhy % is giving diiferent answer in these programing languages? in python i=10%-3; print(i) Output is -2 in matlab b =mod(10,-3) **Output** is -2 in JAVA public class Demo { public static void main(String[] args) { System.out.println(10%-3); } } output is 1 ...

 
 
1 hour later…
6:26 AM
@AndrasDeak am I?
 
 
2 hours later…
8:45 AM
@AnderBiguri yes, we were missing you :P
@TroyHaskin it's tough shit writing language-agnostic code
 
9:12 AM
This was funny ^^^^
Python is not Matlab ~= Java != Ruby != C — Guy 4 hours ago
 
 
3 hours later…
12:21 PM
@AndrasDeak python question
Im atriying to translate TIGRE to python
With a 3D matrix, python[2][1][0] should be matlab(1,2,3), right?
 
12:53 PM
Who's this pretender? @beaker
 
@AnderBiguri Hmmmm isn't it just still python[0][1][2]?
I thought the only difference was really when it came to linear indexing
You should be able to test it by creating a 3D matrix in MATLAB and then loading it into python
 
@Suever yes, it may be yes
My head hurts
becuase then I need to pass it to CUDA and I did weird thins with MATLAB
but the python thing should be easier
 
Does CUDA use a different ordering too?
 
CUDA==Python==C ~= MATLAB
 
Ah OK
 
1:22 PM
@AnderBiguri That's a very strange molecule you got there...
 
Hahahaha
 
@AnderBiguri What's our Euskara word-of-the-day?
 
1:38 PM
Blargh SQLAlchemy is driving me nuts today
 
1:51 PM
 
@Dev-iL did that exist in 2009?
 
yup, since before 2006
 
Introduced before R2006a
apparently yes
 
I checked in advance ;)
 
Different question: how'd you dig up a post last active 5 years ago?
 
1:54 PM
@Dev-iL Was it documented that long ago?
 
@gnovice That's a better question. In that case retag with and carry on ;)
 
@gnovice you, being American, must agree with me that this is a sad state of affairs
 
@Adriaan Although I'm admittedly not a hockey fan, that does seem odd. What is their reasoning for it?
 
@gnovice our news agency said money. NHL is being a dick and wants millions of dollars of "compensation" for them having to stop competition for a month.
 
@Dev-iL Just checked the old docs for 2006a. Sure enough, accumarray was in there. I guess I just hadn't happened upon it yet.
 
2:01 PM
IOC said something about being able to negotiate rather easily and well with all national sports federations (not only hockey), but the NHL is a simple capitalistic piece of shit who wants money first, and refuses to stretch the current contracts around the Olympics. In other words: the Olympics will be a B-grade tournament, worse than the world champs
 
@Adriaan If nothing else, the US excels at creating capitalistic pieces of shit. ;)
 
completely true ;)
I'm interested in how it'll work out; Ovechkin already said he'll go regardless, and the Capitols' owner said he'll pay his fine, if any comes.
Or Putin will pay of course
 
@Adriaan It's one more way he can show us up.
@Dev-iL Working on an accumarray update now.
 
2:16 PM
That output image looks pretty cool
0
Q: stitching images to produce one image by finding features

nman84I am running the following code on the attached 3 images, but my result is not good. I am trying to stitch 3 images into one image (panoroma). The code works fine on another data set, but it does not work on this data set. The 3 images have overlap and were taken inside a room. Here is the code a...

 
@Suever My God, it's full of beige.
 
2:31 PM
@Dev-iL I think I remember why I didn't go with accumarray for that problem. I may have known it existed, but its usage is complicated by the fact that they are accumulating rows of data to operate on. I'm still working out a good way to handle it.
 
@gnovice Wouldn't you just accumarray the row indices and then use them within the @func?
 
@Dev-iL obviously an impostor. he's facing the wrong way.
 
@Suever Actually, I gave a solution for a similar problem a year and a half later... :)
8
A: Is there an accumarray() that takes matrix as `val`?

gnoviceOne solution is to replicate the row indices in labels and add another column of column indices. Then you can reshape X into a column vector and apply ACCUMARRAY once: labels = [repmat(labels(:),nCols,1) ... %# Replicate the row indices kron(1:nCols,ones(1,numel(labels))).'...

 
@Suever why is it being closed as No MCVE?
 
@Adriaan I voted to close as being "why isn't this code working"
Because that's literally what it is
 
2:43 PM
Yea, I get that, but he does give sample input and code... I think I'll refrain from both voting and answering on that
 
2:56 PM
@AnderBiguri again, it depends on implementation
by definition it's off-by-one in indexing, but also matlab is column-major while numpy is row-major
that's why you often see the order of dims reversed, because that will lead to the same memory mapping
And then taking function_values["y0,z0, any x"] will be equally contiguous on both: arr(:,y0,z0) on matlab and arr[z0,y0,:] on python. But it really only depends on how the code is written.
 
3:46 PM
@Dev-iL Karramarro
@AndrasDeak Thanks!
I was getting mixed up with that, but I read some thing around and your comment confirms what I read
 
@AnderBiguri So basically Engrish version of "calamari"?
 
no worries:)
 
@Dev-iL aw, I thought it was "caramel marshmallow" :(
 
marshumarro?
 
What does it mean about a statement, from a purely logical (not logical!) perspective, if both the statement and its opposite/negative are true?
 
3:54 PM
that it's not a logical statement
or that it's not actually its negative
 
Or the statement is null ...?
 
that's nonsense mathematically/logically
 
Good.
 
"tertium non datur" or "no third choice" means that "A or not A" is a tautology, and my hunch is that this this could be rewritten to "A and not A" is always false
 
Above is a photo from a recent demonstration. What's interesting is that the green sign says the exact opposite of the orange sign
 
3:57 PM
yeah, the negation of "A or B" is "(not A) and (not B)", so the negation of the tautology "A or not A" is the necessary falsehood of "(not A) and (not not A) == A and not A"
 
("ıcδ" is how one writes "no")
 
that still means that half of them are right :P
hand-written Hebrew is weird
 
hand-written Hebrew is weird
there, fixed that for you
 
I watched the finale of some show today, at the end the show creators wrote "thank you" in a bunch of different languages. They completely botched the Hebrew and Arabic versions.....
 
How dare they
 
4:04 PM
Indeed.
 
They probably figured no jews or arabs were watching their show anywys
 
Hi everyone
I have an array with x-coordinates and one with y coordinates:
X = [0,2,3,4,...]
Y = [0,2,3,4,...]

I would like to combine them in one array like so:
XY = [X;Y]
and plot(XY)
 
@ballBreaker Pray tell, since when is there some 1-to-1 mapping between a nationality and a language?
 
however it doesn't work
I don''t get points at the x-y coordinates as expected
What would be the correct way to do that please?
 
why can't you just plot(X,Y)?
 
4:07 PM
@Dev-iL Since the birth of language I would imagine
 
@trilolil read the documentation on plot. It'd be plot(X,Y)
or, plot(XY(:,1),XY(:,2))
 
@Dev-iL Because I am trying to implement a Kalman filter and at some point in my code that complicates stuff
Having them in one array may make it easier
ok I'll probably change the way I implemented it
 
@trilolil Looks like you should delete everything and start over I agree with your last post
 
@Dev-iL plz man, don't be so harsh...
 
/humor off
 
4:09 PM
@trilolil go with what I posted
 
meh I'll just reimplement it
makes more sense to have them separate actually
 
...
 
¯_(ツ)_/¯
 
@trilolil now you have to fix it
@Suever OP is looking for a way to subtract matrices of arbitrary size (i.e. both of them are differently arbitrary at the same time) :D
 
@trilolil look at your definition and look at what Adriaan wrote there: you're off by a transpose
either assemble your arrays row-wise, or transpose the original
of course if you separate them then this doesn't apply
 
4:18 PM
@AndrasDeak no it's ok thanks, I just realized that for my case it would make thing unnecesarily complicated. Let's just keep them separate.
 
More variables = more complicated, less verbose
 
OK, but try to understand what I wrote anyway, because the concept will benefit you in the long run
 
I really hate asking questions on SO
 
@Dev-iL Nooo
 
@Suever why? We could use some finally-not-a-pile-of-shit questions
 
4:19 PM
Well non-MATLAB questions
Because I'm afraid I'll sound like a dummy!
 
@Suever You will, but your rep will throw downvoters off your scent
 
yeah, nobody even imagines that a 50k-er is a dummy, you're safe:P
 
@Adriaan Probably true but their expectations are going to be higher as s result
 
This question is a mess. I wrote and immediately deleted two comments trying to make sense of it
 
4:20 PM
I just posted an issue to matplotlib's github yesterday, I was told that it's working as designed (so I'm stupid) :D
 
@ballBreaker no, will do after dinner
 
:) Awesome
 
Does anyone know what this is talking about?
0
Q: Is there a way I can edit or rewrite default Matlab Apps?

TristanIs there a way I can edit or rewrite default Matlab Apps such as "Image Viewer?" Matlab R2016b

These "Apps" are crap
If anyone happens to know SQLAlchemy!
0
Q: Hybrid property representing a shifted date in SQLAlchemy

SueverI am attempting to create some SQLAlchemy models and am struggling with how to properly apply a timedelta to a particular column. The timedelta (specified in days) is stored as an integer in a separate table (Shifts) and is potentially different for each record in my Exam table. If I use a hybri...

 
Crap indeed
 
@Suever ho boi, SQL... You're going to get burned :P
 
4:24 PM
Well it's SQLAlchemy so hopefully they're nicer
 
lot of guys in those tags, hopefully you'll get some reasonable feedback
 
It's super annoying
Like I know the exact SQL query I'm trying to emulate
Now I get to sit around and pick my nose while waiting for an answer
 
@Suever #WaitingOnSuever
like every other scrub ;)
 
I've been on an email unsubscribe spree. Today I've unsubscribed from ~10 mailing lists
 
I know that feeling
 
4:29 PM
I registered for the first service with account+descriptor@gmail.com format yesterday
 
I don't think I understand
 
Ah yea that's such a good method
Call out all the sites that sell your data
 
> Append a plus ("+") sign and any combination of words or numbers after your email address. For example, if your name was hikingfan@gmail.com, you could send mail to hikingfan+friends@gmail.com or hikingfan+mailinglists@gmail.com.
I've known about this for a while but I've never bothered to actually use it
 
account+descriptor@gmail.com is also a great way to get free wifi on airplanes since you can always register as a "new member" and get the free trial
Same with s.u.e.v.e.r@gmail.com and sue.ver@gmail.com
 
yesterday I had to register to spotify so that I can listen to this :D
so I used that now, for the first time
@Suever oh, neat idea!
 
4:32 PM
Yea I do that every time I fly
As long as there is a pass for free trials
 
I don't trust public wifi, but still, general concept
 
oh that's very interesting
 
Which most US carriers have
 
@AndrasDeak wat. o.0
 
ssh -D 9000 suever@mysecretserver
 
4:33 PM
can you actually access the other email address the +mailinglist for example, or does it send all of those emails to a specific folder ?
 
@Suever sure, I'm too lazy for that
and I usually read stuff on my phone when I'm traveling (when I can)
@ballBreaker it's redirected to your main I think
 
@LuisMendo that last edit is hideous
 
just like b.all.b.re.aker@gmail.com
 
Yea they all show up in the main folder but you can tell who sold your info based upon the addressee
 
sorry, but then, what's the point of using it?
 
4:34 PM
@ballBreaker that -------------------------------------------^
 
oh o.O
 
@ballBreaker Blockable / Easy to filter
 
@Suever Ohhhhhhhhh okay
so if you were on SO, and you signed up with "ballbreaker+stackoverflow@gmail.com" .. then you would see that they are selling your info
very interesting
 
yup
 
@Suever TB on that homework problem
 
4:36 PM
time to sign up for a service with
"ballbreaker+yourmomisaslut@gmail.com"
 
TB or not TB, that is not a question
@ballBreaker send email to your friends
 
bahaha
 
"joe+sucks@gmail.com"
 
done.
It was my coworker who sits next to me, so now we will wait and see...
 
he might not even notice though
they might or might not get a warning banner of "yes, this is your e-mail", like how it goes with misdotted addresses
 
4:40 PM
@ballBreaker that's pretty nifty
 
It's a really good end to the album I'm listening to
If you're interested
I wanna find a physical copy of this and buy it for my dad lol
 
waffles
 
on the torrent, I'm guessing? D:
 
album is almost here :P
 
^_-
le confused
You found one with seeds?
 
4:44 PM
@Adriaan TB?
 
@Suever too broad
@ballBreaker PTB said no seeds/leechers, but there were seeds anyway
 
oh noice
I've been buying albums from bandcamp for a while now
since you can download them in .wav or .alac/.flac versions
Let me know what you think about the album though! Some amazing guitar on it, and drums..and bass.. really good all around
 
@beaker It is. One more vote...
 
But then again.. maybe I'll just go ahead and get the torrent :P I don't have money for music atm
 
quick question

figure(1)
for k=1:30
hold on;
plot(4+k, 5+k )
end
why does this result in a blank graph?
 
4:55 PM
it points 1 point after the other, with no marker
you can't get a line with separate calls to plot, and you need to set a non-default marker to see anything other than 1 pixel
e.g. plot(4+k,5+k,'o')
 
OK, ill try to gather my points in 1 array
 
you definitely should
x = 4+1:4+30;
y = 5+1:5+30;
 
5:09 PM
@LuisMendo Well, it's clear now. It's just ugly.
 
5:27 PM
@beaker Is it? The dimensions 4x3 and 4x2 are still incompatible with the minus operation. The example has different dimensions
Also, is the transpose in the initial text be missing in the example? The notation is confusing
So yes, in any case, it's still ugly :-)
 
in the new example it's a 2x2 - [2x1 2x1]
 
5:42 PM
Should I preallocate sz if I do [sz(1),sz(2),sz(3),sz(4)] = size(someMat); ?
or this falls under premature optimization...?
 
@Dev-iL not necessary in terms of running code, might be worth it for computation time, but you'd better time that instead
I don't think it actually matters
 
Well, mlint doesn't complain about that...
 
@Dev-iL well, as I said, it runs fine. I'm not sure which is faster though
 
I know it runs..... :)
 
What's wrong with sz = size(someMat)?
Are you collapsing dimensions?
 
5:47 PM
because I have to ensure it has 4 elements
for reshaping later on... so "yes"
 
Yea I think that's probably over-optimizing
They are all scalars
so the effects are going to be neglible
You could do [sz(4), sz(3), sz(2), sz(1)] = size(someMat); sz = flip(sz); :p
@LuisMendo Ugh
says "error: bsxfun: nonconformant dimensions: 4x2 and 4x3" — Saransh Karira 1 min ago
 
bahahaha
 
Please learn to format your question bold formatting is rarely necessary and makes a post hard to read. Additionally there's a thing called "code formatting" please actually use it for code, don't make everything bold or quote-yellow or any other type of painful-eyes-formatting-disco. — Adriaan 6 secs ago
my two cents ther
 
@SaranshKarira No. write out how you expect the output to look just like you did with your 2 x 2 example (Hint: it's not possible) — Suever 9 secs ago
 
6:03 PM
Voting to close as unclear until example input and desired output using the actual matrix dimensions is provided. — beaker 22 secs ago
*are
 
6:26 PM
ok guys
this is something I have been stuck with for a while
I want to calculate the covariance
not in advance, but as the data is coming in...
So if at T1 x1 enters the system cov1 should be calculated
at T2 x2 cov2 should be calculated (without having to save in memory x1!)
some sort of moving covariance
An suggestions?
 
@trilolil yes, read mcve
 
@Adriaan sorry?
 
usually that works; Well, in comments it does
 
@Suever Haha. That's what you get for answering those questions
 
@Adriaan what is the point you are trying to make? Is my explanation unclear?
 
6:30 PM
@LuisMendo lol
 
:-)
 
@trilolil yes.
 
Is there an easy way to calculate a running covariance in matlab? @Adriaan
 
Please don't use this room as a short-cut for asking questions. Before you post here, think about what'd happen when you post your question on SO main. If you expect downvotes or your post to be closed, it's probably not a good fit here.
5
 
6:40 PM
I don't know if you are in a bad mood or what ever, but I truely think my question is straightforward and legit. I think it is not overly complicated. Either you are craving for upvotes and absolutely want me to post something on SO either there is smth else.

I am totally aware of the function movar in matlab (so I could that to start with), but I don't think this is usefull in my case because, as said I only have one value every time and need to have a value from the beginning.
Next to this I tried to use it but unfortunately the function is not defined for my vesion of matlab
@Adriaan
 
@trilolil I'm not in a bad mood, nor am I craving upvotes (I rarely answer anyway). The "something else" you are referring to, is new people, amongst which you, coming into this room lately asking questions which would not be on-topic on SO itself, thus using this room as a circumvention for the system.
As for what you tried: I again refer to MCVE, I can't see what doesn't work as long as I don't see your code, as I am not clairvoiant
 
I can't provide you an mvce of something I don't know
@Adriaan
 
@trilolil
 
ba dum tsss
 
7:18 PM
pewpew
 
@ballBreaker pew pew?
5
 
what is this
oh, neato
 
It's therapy for when you come across a horrible web page.
 
@gnovice I didn't even know that I needed this THAT much in my life
 
Yeah, this is epic
 
7:29 PM
amazing in chat=)
 
lool yeah
just destroy messages you don't want to see..
 
It's great for dealing with shitty questions. ;)
 
That is so amazing
 
I like that you can get a ship that is so powerful it lags the browser out a bit
 
7:49 PM
Interesting SEDE query:
26
A: What is the average number of accepted answers / number of answers ratio?

Robert LongsonYou can use SEDE to query the database: if (select count(*) as total from posts q inner join posts a on a.parentid = q.id where q.posttypeid = 1 and a.posttypeid = 2 and q.acceptedanswerid is not null and q.answercount > 1 and a.owneruserid = ##UserId##) > 0 select cast(cast(mine as float) / t...

 
@LuisMendo I got 59.4%
 
@gnovice 35%, but I suck balls
 
user6845426
Hi guys, I've got a simple script which reads an image and plots a horizontal graph. The graph is displayed as default with no fill and blue line colour. How can i go about changing the line colour and giving a fill?
 
I'm 60%
Boom.
Rekt.
Although is it bad if I think around 1/4 or 1/3 of my accepted answers are self-accepts? ;)
 
Lol, 25% :)
 
8:03 PM
This title
0
Q: uencode error ! -matlab -signal proccessing

ahmed Guys can someone tell me what is the cause of this error : >> x=[0.001 , 0.5 , 0.4]; >> y=uencode(x,(100000/8000)) Error using uencode>uencodeParseParams (line 76) Number of output bits must be an integer from 2 to 32. Error in uencode (line 30) [u, Nbits, V, isUnsigned] = uencodeParseParams(va...

@dipper help fill or help area
 
@ballBreaker Being able to solve your own problems is never a bad thing.
@Suever I vote close as typo.
 
user6845426
@Suever perfect, thanks
 
51%
and quite a few of my answers compete with Divakar, so no wonder :P
 
8:21 PM
So I have the highest accept ratio so far ;)
But then again, I probably have the lowest questions answered
 
You should know that lower = better
 
Lower IQ ?
 
see, everything's better=)
 
lmao @Andras so therefore, older people = better people
Seems legit
 
8:34 PM
 
9:27 PM
@gnovice That's a lot! I have 45%
@flawr How's your course going?
 
So tired of this person
Then there is an issue with your previous question's answer. Please update the question there rather than posting yet another question that is a duplicate. — Suever 46 secs ago
 
9:43 PM
at least he's trying not to be a different kind of bad person
I didn't read the questions to tell how much it's changed
I suspect that he's just a shitty asker
or she, I guess Toni could be either
 
Well first question was: How do I get magnitude and phase from the output of fft2 because I can do it in ImageJ
Second question: How do I get frequency and direction from the output of fft2 (despite that fact that they included the equations to get both in question 1)
Third question: Why is the answer from second question different from what I get in ImageJ?
 
Getting magnitude and phase is hard. Matlab calls them differently, abs and angle :-P
 
All three can really be distilled down to 1 (maybe 2) questions
1) What transformation does ImageJ perform when computing the FFT
2) How do you get magnitude, phase, frequency, and direction from fft2 in MATLAB
 
@Suever three questions, same asker, same image?
 
@Suever yeah, but that means that if they ask a new question it's a dupe, if they change their old one they're turds
so they're between a rock and a hard place
 
9:58 PM
well this latest one should just be a comment on the second question
 
@Suever ... that being said, SleuthEye corrected the minor issue remaining, and now there is no need at all for this question, which I'll come back to delete shortly. — Toni 7 mins ago
aww yisss
 
because it is clearly an issue with the answer to the second question
Clearly annoyed with that person today
lol
 
@AndrasDeak deleted by now
I'm off to bed, good night all
 
Good night, elephant!
 
good night
 
10:25 PM
@Suever don't forget to ask about your question in the python room in 2 days if it doesn't get any attention
 
@AndrasDeak Will do, although by then I may have hacked together an answer of sorts
I'm starting to read through the docs from beginning to end
 
good luck:)
 

« first day (643 days earlier)      last day (2589 days later) »