« first day (573 days earlier)      last day (2879 days later) » 
00:00 - 22:0022:00 - 00:00

00:04
good night
Goodnight @AndrasDeak
good luck with math guy;)
 
10 hours later…
09:56
Can you think of some commonly-used MATLAB functions that take some ">1-D" arrays, do some processing, and output a vector? (to be precise, a vector that has the same number of elements as the input array)
I'm not talking about trivial things like "all-ones" logical indexing or (:)... :)
10:46
Also, please review...
Joe
Joe
10:57
hi I have a question
Is it too minor to post a full question about?
Joe
Joe
yes
a little quez
quiz?
Go ahead...
Joe
Joe
question
ok
I have a matrix in my workspace called matrix , it's 100 * 3900 .. I want to save this matrix for ever , I mean I do not want to lose it when I run other scripts. How can I save that matrix?
right click and export it as a .mat file mb?
Joe
Joe
11:02
God bless you man
@GameOfThrows
Hmm, I'm not sure the technology exists (or could exist) for saving something "forever" :)
11:20
@RodyOldenhuis @Suever @rayryeng please dupehammer: stackoverflow.com/questions/41826257/…
11:30
Are any of you guys using the operators shown in line 3.?? I've never even heard of them....
[1 2 3].^-2
I didn't realize these were considered their own operators
Next question: how do we overload them? :D
They added the line in R2016a
it's not in the R2015b docs
not sure why the distinction is needed
I'm sure there's a mathy reason for it
@LuisMendo how is the above treated in MATL?
11:52
This is trippy.... magic(2).^+magic(2).' == magic(2).^magic(2).' -> [1 0; 0 1]
Who would think these are different.....
One more down vote here and we can delete it: stackoverflow.com/questions/41826257/…
@Adriaan Why is the answer getting rep?
It feels like something is going on ... or people are stupid.
0
Q: How to check all the combinations of P elements in a array with total N elements in Matlab?

Changfeng ChenI want to ask how to check all the combinations possibilities of P elements in a array with total N elements in Matlab? I am now trying to use P element from an array which contains N elements, let's say array A, to test in another program. If this group of P elements fails in the program, I will...

wtf is this person asking
@Dev-iL MATL uses postfix (revese Polish) notation, so precedence is crystal clear: first operations are done first :-) For example, this computes 2^((3+4)*5)
There's no unary + in MATL. Unary - is _ and is also postfix
@Dev-iL Because of operator precedence, I'm not surprised.
The fused power-unary plus has a lower precedence than straight transpose and power.
12:05
Is the behavior the same in older versions?
So they functionally expand to
> power(magic(2),transpose(magic(2))) == transpose(power(magic(2),magic(2)))
Dupe, no good as pointer, short answer which isn't an improvement over the original ones stackoverflow.com/questions/41826257/…
@excaza That's a good question.
@TroyHaskin it's pretty stupid, but if we just delete the question (well, 20k users or 10k users in 3 days) it's gone, including the rep
12:24
I wish at least elementary combinatronics was part of basic curriculum
@TroyHaskin I've linked to this page earlier, which also started this discussion :) The reason for the behavior is clear, what's unclear is that these seemingly identical ways of writing the same thing are actually not at all the same thing
@beaker re this: I think SO markdown turns tabs into 4 spaces or something
@Dev-iL Sorry. I just woke up was too lazy to actually read for context. #Murica
Np, have a nice day :)
But yeah, operator precedence can really screw over programs like that.
12:28
Btw, you guys are welcome to link to a doc page I created today in questions where it's applicable (it talks about how using length is a bad idea generally).
Thank the Gods for brackets!
I had a dream about Mario Kart getting a story mode (with Kirby having the best arc) and then something about finding and exhuming the long-lost remains of President Lincoln to save his legacy or something.
... Better than average, I guess.
the ghost of president past
@Dev-iL +1 but chappjc said it better :-P
> never use length. Ever
12:45
well if you know it's a vector there's no reason not to
I prefer sqrt(area()) instead of length.
>> sqrt(area(1:12))
Undefined function 'sqrt' for input arguments of type 'matlab.graphics.chart.primitive.Area'.
:(
But that only works because I use square matrices.
:D
>> sqrt(area(magic(2)))
Undefined function 'sqrt' for input arguments of type 'matlab.graphics.chart.primitive.Area'.
:(
I said I prefer it. Not that it works. ... Wait, I said it works. Crap.
FOILED!
12:49
FOIL was the name for two different programming languages. == CAI style language == The first FOIL was a CAI language developed at the University of Michigan in 1967. The acronym stood for File-Oriented Interpretive Language and it was very similar to other CAI languages like COURSEWRITER and PILOT. However, it tried to make the language somewhat block-structured using whitespace which ended up making the language vaguely similar to BASIC or ABC. === Example === :START COUNT=0 TY Enter the number of times you want to repeat the statement: ACCEPT MAX=NUMBER.(1) :LOOP TY This loop ...
@Dev-iL this is the same in R2014b
eval('TY FOILED!');
I would guess someone made a bug report at some point and they eventually added it to the documentation
Sometimes I really hate how dense people can be
thanks, @Suever! The work-around solution (e.g. "from_1st_5th") does its job for now, yet I am still looking for the actual outcome in the form as described above — John 4 hours ago
Indeed,
13:02
@excaza Funny
I do prefer sparse people. A little upfront overhead but really quick operations.
@Suever some people {think they} want to do something exactly once.
Or they think "there has to be a way"
could just replace hyphens with underscores v0v
@Suever This reminds me of a post about metaphorically climbing through windows when they can just use the door, with reference to the XY problem, I believe...
13:08
@excaza That's precisely what he said "wasn't good enough"
geez
Well it also has to do with someone not comprehending that data and display of data are two different things
well, it's not what genvarname did
I'd be a little annoyed at having to type T.from1st0x2D5th too :p
Yea I'm kind of surprised that genvarname did that
someone left this datalogger on overnight
-.-
I've been downloading data for like 20 minutes
"Solve a bug and the user will bug off for a day. Teach the user to solve bugs and he will bug off for 2 days." --Random FB friend
I should put that in my SO profile
I'm almost halfway to a gold badge
be there never!
13:26
I made some progress again today! 580/1000 points now :P
13:37
@Adriaan Working towards that oh so sweet dupehammer
@Suever will get that in 6-8 at this speed
14:37
datetime is really fucking frustrating to work with at small time scales
the general concensus in the python room is that datetime is a piece of shit (not that there's a better option)
ever tried java datetime :D?
it's also poorly documented
to subtract seconds you need to do datetime('1.00', 'InputFormat', 'ss.SS') - seconds(0.01)
but there's no mention of seconds in the datetime documentation
I believe it's common knowledge that seconds exist, dude.
not the function, dude
14:43
Time is just a construct invented to keep you imprisoned by your own mind!
also datestr can't do milliseconds
wtf
maybe it was shoehorned into MATLAB as it was into python, inheriting its original crappy documentation and syntax
And yet it exists.
> >> which seconds
C:\Program Files\MATLAB\R2016a\toolbox\matlab\timefun\seconds.m
function updatecountdown(timerobj, h)
currtime = datetime(h.cdbox.String, 'InputFormat', 'ss.SS');
tickduration = seconds(timerobj.Period);
newtime = currtime - tickduration;
h.cdbox.String = sprintf('%.2f', newtime.Second);
end
lol
MATLAB pls
hmm?
what should that be instead, ideally?
14:49
It needs more eval.
@AndrasDeak really just less obtuse
they have datetime, duration, all its related time demarcations, timeseries, etc.
well you could make it more elegant by h.cdbox.String = sprintf('%.2f', (datetime(h.cdbox.String, 'InputFormat', 'ss.SS') - seconds(timerobj.Period)).Second); ;D
except that invades my 80 character scary line :p
...
( Í¡º ͜ʖ Í¡º)
15:06
@excaza Am I missing something? Couldn't you do this?: h.cdbox.String = sprintf('%.2f', str2double(h.cdbox.String)-timerobj.Period);
15:20
@LuisMendo LOL
Windows, 0 bytes. Leave the computer on for a few days and let automatic updates do their work — Luis Mendo 2 mins ago
Nice.
Too bad my machine has been told not to do that.
And my machine knows who the boss is.
Well I think that's a perfectly valid answer because the specification of OS would simply be "Windows with Automatic Updates Enabled"
@gnovice that immediately breaks as soon as you move away from decimal seconds
That challenge is super open-ended
yup
"I wrote this utility called s, I assume it is installed"
15:24
I rebooted my local several times coming up with an answer
:D
so it's really the worst snipe ever
> The Nokia E70 ... can even run terminal software to telnet or SSH into remote servers ... I can reboot my web server if I want, and sometimes I do just because I can
@excaza I'm not following. What is the period, and what is the string initialized to?
Period is seconds
string is decimal seconds
as soon as you don't use decimal seconds you have to change that line
so why not do it right the first time?
> When the iPhone was first announced, CEO Steve Jobs spewed enough BS to cover a football field full of babies 3 feet deep in bullshit,
15:33
He's not wrong.
"alternative facts"
@excaza that's American legislature now right? You have to provide alternative facts with everything?
I love how one kneejerk phrase from a moron trying not to get fired is now the poster phrase of an administration not four days old.
@Adriaan Yes, because people are special snowflakes, and "actual facts" might harm their delicately-constructed fantasy worlds. ;)
He can take dippin' dots from my cold dead hands
15:38
@gnovice Yes until reality melts them into a tear-drop running down some millenials sad pathetic cheeks
@Suever LOL too:
@RaisingAgent Here at PPCG we solve our problems in code. Physical labour is frowned upon. — steenbergh 2 hours ago
^ Lies
Alternative lies.
LOL
15:40
Also
"I'll add a short explanation later, my laptop is currently off." <- The danger of a shutdown challenge — Suever 2 hours ago
This challenge is full of gems
@LuisMendo LOL. Literally.
Trumpistic introduction into the Netherlands by a Dutch comedian
21M views apparently already
16:01
@Adriaan I'm seeing 1.5M
Do you wanna dub over this in english so I don't have to read the subtitles
I feel like it would be funnier with words
I don't understand why this is upvoted
it's a typo...
Would you feel better if I downvoted?
that doesn't help me understand
@ballBreaker yea. 1.5M on YT, 21M on FB
@excaza and why that bozo answered it
OOPS IT'S SUEVER
16:10
he is a bozo :p
@Adriaan ah hah I see
close as brain fart
@excaza It's not actually a typo though
yeah I mean the dude also did -.5
He just hates readable code I guess
16:11
how is it not a typo
it's fixed by the addition of one character
it is a typo, asks for a nonexistent operator
A typo would indicate that it wouldn't run, no?
unlikely to help future readers
"typo"
@excaza well it wasn't really "broken" though?
why would a typo indicate that it doesn't run?
16:12
It's not incorrect in it's current form, just confusing
and unlikely to help future readers:P
yes
but that one's a famous trick question and people are stupid
Yea but I still think a typo is something that is incorrect
it's more likely to help future readers
16:14
There is nothing incorrect in that post
yes there is
What?
there's either no space or no decimal digits
or an extra decimal
typos
Just because you don't like it, doesn't mean it's wrong?
and MATLAB says it's wrong
16:15
Or the user wanted the decimal there
all are valid
so that kinda makes it wrong
the user doesn't understand what it's doing (correctly) because it has a typographical error:P
It's like arguing between
` if {
      do stuff
   }

and
  if{do stuff}`
MATLAB runs it just fine
@ballBreaker nope
16:15
god damn markup
meh, whatever
@AndrasDeak It also doesn't sound like he wrote it
it's still a typo and a dumb question
It's just confusing abuse of syntax
cool
16:17
And whoever wrote that hates everyone
@ballBreaker obviously
Perhaps a better example would be "color vs colour" ?
anyways, doesn't matter
Does MATLAB really display an mlint warning?
@Suever the feeling's mutual:D
16:18
no
Then how does "MATLAB says it's wrong"
mtree('1../2')
  mtree (complete: 4 nodes)
     Node 1: PRINT
     Node 2: DOTDIV
     Node 3: DOUBLE "1."
     Node 4: INT "2"
I just said it didnt
Right but you said MATLAB said it was wrong so I was curious what that was based on. Whether you actually got an error, warning or what
You win, don't care
more relevant than ever
16:22
Nice
Was just curious is all
How's that ASMR video coming along @ballBreaker?
oh god
It's uh...not haha
I sent the make up video to some of my friends. They thought it was great
You're a minor celebrity
Oh really? hahaha thanks for doing that
I'm almost a Z list celebrity!
Haha
We have a whole 11 subscribers!
Just 999989 away from hitting that first mil !
Pretty much there if I say so
I wonder if there's a reddit place I could post videos and try to get more views..
Although the internet is pretty ruthless.. so.. hmm
Is there no ASMR subreddit?
Oh I'm sure there is
I swear there is a subreddit for everything
I particularly like how the upvotes are intentionally wrong.
@Suever lolol ... hmm
Might not get rekt if I post in that sub-reddit but I think that means I would require a reddit account
Oh no it says do not link directly to youtube, and self-promotion is discouraged haha
17:24
@Suever inb4 please deobfuscate "my" code
@excaza i hope you guessed that i am doing experiments for education purpose — dato datuashvili 10 secs ago
ok thanks , i have got experience in another topic — dato datuashvili 1 min ago
lol
This guys is a fast learner
@datodatuashvili after so many years reputation on this site, you should know how to write a proper post. So no "good evening" and other pleasantries, use code formatting only for code etc. I do realise English is not your native tongue, so don't worry about that, but at least take care to do the rest properly. — Adriaan 10 secs ago
@Suever ^pedantic wanker he is
self-removed
our IT has managed to set up permissions so restrictive that even they don't have permission to uninstall applications
2
@AndrasDeak :%s/ /\t/g
🙄
17:41
Offline for maintenance?!
We're going down!
But who is going to do peoples' homework for them now!?
@Suever or fix code, grammar, pleasantries, tags and title after being 6 years on the site and doing a PhD?
umm...this "offline for maintenace" pic is new to me
We are having database or network issues on Stack Overflow - investigating now.
17:45
hehehe, they gained 300 followers the past 5 minutes :p
Whew, I thought maybe I'd been in one too many lab explosions.
NY-SQL02 is locked up, we are moving services over now.
18:00
@StackStatus How do you debug stackoverflow errors when stackoverflow is down?!? https://t.co/4tRDui6pDl
18:16
did they change dir's output format at some point recently?
They added the folder field (in 2016b I think)
oh
ok
I was wondering why the hell I was building the full file path under name in subdir
it is new to R2016b
yea it's beautiful now with fullfile(result.folder, result.name)
18:35
Do you find it fullfiling?
nice
 
1 hour later…
19:49
@excaza lmao
I'm now sitting on 3 installs of Python 3.6
and pip won't work because the install location is hardcoded in pip.exe
which I can't edit because I don't have write permissions
I hate everything
I also can't edit the Windows PATH
so I had to have them change it
then come back and change it because they got the case wrong
4 mins ago, by excaza
and pip won't work because the install location is hardcoded in pip.exe
there's your problem ---------------------------------------------------------------^
are virtualenvs out of the question?
or is it so broken that none of the 3 could be used?
I can use python -m pip install --user
it's just annoying
it's hilarious, but I have to say I hate LaBeef much less now
20:08
Isn't the saying "he will not divide us" doing just that?
lmao funny video though
That dude definitely deserved that yelled in his ear though
@AndrasDeak Yes, we're all given bobble hats just like that at orientation.
21:08
@LuisMendo @beaker You guys do golfing in Octave. Thoughts on this?
Thanks,no need to load if the package is properly installed you can test it in Octave Onlinerahnema1 5 mins ago
21:21
@Suever I try not to get involved in those rule-lawyer problems. I know they've required includes and imports in other languages, but I've used image processing functions in Octave before without explicitly loading the package. Only meta can tell.
I just know I got called out for not having them before
It doesn't really matter to me
But saying "it's allowed because this online interpreter automatically includes them" is kinda fishy since the whole point is for everybody to be able to run the code as written on their own environment, not the one you pick.
yup
I have an opinion
@beaker In PPCG, languages are defined by their implementation. The online compiler is definitely an implementation. So I think it's valid @Suever
Even in offline Octave you can install packages so they autoload and you don't need the load statement
Oh, what rahnema1 said. It's the -auto flag
then i should have used the Statistics and Machine Learning package much more often ;)
hmmm... I wonder if they've implemented all of the graph algorithms from the bioinformatics toolbox yet ;)
21:37
Just realized that sparse adds duplicate values together
That's unfortunate
mmm... there's a way to stop that, if i remember correctly
a flag or something
although i'm not sure what the expected outcome would be of duplicate subscripts
Trying to do that freeman coding challenge and was hoping to use sparse to populate everything
I want it to take the last value specified for a location
Was hoping to not have to initialize a 52 x 52 matrix but that looks like the only way
because it's supposed to overwrite values that it passes back over
i must have been hallucinating, i don't see anything that avoids adding the values
I can do a little sub2ind action followed by unique
Just not as pretty
unique rows on the subscripts won't work?
21:43
@Suever Wouldn't plain assignment do? It keeps the last value
You may need sub2ind though
@LuisMendo Ohhh! Good call!
What challenge is it?
1
A: Guide the Alphabet

rahnema1Octave, 145 bytes @(a){[x y]=find(~impad(1,1,1));c=cumsum([0 0;([y x]-2)(++a,:)]);c=c-min(c)+1;n=nnz(a);[nonzeros(sparse(c(:,1),c(:,2),65:n+65,'unique')')' '']}{5} Since tio doesn't support impad function I changed it so it can run: Try It Online! Some Explanations @(a){ [x y]=find([1 0...

I have a decent stab at it so far
@LuisMendo want me to accept this answer of yours:
20
A: Plotting the Cornu spiral

Luis MendoMATL, 29 26 25 bytes Thanks to @Adriaan for 3 bytes off! Q:qG/q1e3YytP+1e6j*ZeYsXG Here's an example with input 365 366... because today is MATL's first birthday! (and 2016 is a leap year; thanks to @MadPhysicist for the correction). Or try it in MATL online! (experimental compiler; refresh ...

00:00 - 22:0022:00 - 00:00

« first day (573 days earlier)      last day (2879 days later) »