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

3:47 AM
@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.
 
 
5 hours later…
8:26 AM
Hi all!
 
8:40 AM
@BillBokeey Hello! What's happening?
 
I'm doing fine, what about you?
 
8:59 AM
@David Good!
hi fellas, how are you doing today?
 
9:11 AM
@AnderBiguri Still waking up
and already amazed by some 25 characters getting +7 within 10 minutes :p
7
A: construct array of maximum values between two arrays

DanThis is exactly what the max function does by default: C = max(A,B)

 
haha same here. I am waiting for my usual coffee gang to show in the office
hahaha I got one of those the oder day
using diff
the more RTFM the answer is, the more upvotes
 
man, I have to actually do bloody much work to get above even 3 upvotes :p
 
Let's close as duplicate
 
do you have one?
 
:D
 
9:13 AM
Im sure there is
 
Let's see
(the answer for the above is in the body of this question)
 
yes, but not sure if that qualifies as duplciate
 
It does the same thing though. Divakar answered almost the same and Troy answered the thing Learnvist answered before he copied Dan's code
 
10:12 AM
19
Q: If another question is the answer, is it a duplicate?

QuentinThe question Why split the <script> tag when writing it with document.write()? takes a solution and asks what problem is is solving. The question Script tag in JavaScript string takes that problem and looks for a solution. The latter has been marked as a duplicate of the former, despite the fac...

 
then lest gooooooooooooooooooo
oh
nope
i misunderstood
too much Monday today
oh I didnte, there are 2 contradictory answers
 
The whole purpose of "close as duplicate" is to solve the searchability issue. The action is, after all, close and not delete. — Ben Voigt Aug 11 at 0:21
 
10:28 AM
voted
 
10:41 AM
@David Project Euler, that's a good idea! Your first code gives me an error. Perhaps it's the backticks again. This is how I'd do it: It999I$;5t999I$;husD
 
Guys, I have a question: Suppose I'm trying to preallocate an array of objects the size of another array.. Now MATLAB's way of doing this is here but how do I extend this to work with inputs of any number of dimensions (w/o using eval...)? Any ideas?
subsasgn ?
...Yeah that seems to have done the trick
 
11:09 AM
@David My take at problem 3:
matl '600851475143ttX^;\~ftbw/htZp)0)D'
It uses Zp (isprime), which might be considered cheating :-)
 
@LuisMendo nah its not! :P
I have like the first 50 PEuler exercises in MATLAB if you are interested XD
btw, do you know how to add a gif animation to stackoverflow? I did it before, but I cant now Idont know why
 
@Ander The first one are so easy that the only challenge is how to do them in a stack oriented language :-)
 
@LuisMendo yes indeed!
 
@AnderBiguri Do you mean how to generate a gif from Matlab?
 
later on, they are not as easy anymore XD
@LuisMendo No, I have the gif. Its just I would like my SO answer to show it
0
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...

 
11:13 AM
368
Q: Formatting Sandbox

Ólafur Waage As per Jeff's suggestion in this comment: You can use this question as a formatting sandbox. You can edit this question itself (Community Wiki questions such as this one require 100 reputation to edit) post answers to this question (Since this question is protected, this requires earning 10...

 
imgur creates gifv files, and SO doesnt like it
 
So... just add the image as usual?
Ah, so it's a special format? No idea then
I just add them as usual
 
include as html?
 
I have gif now, but doesnt like it either.
 
Ander did you check out the meta post I linked?
 
11:15 AM
@AndrasDeak I guess. I need to learnt html first XD
 
there are several moving thingies in there
![Roll the ball!][1]
Works using Markdown...

<img src="https://upload.wikimedia.org/wikipedia/commons/4/4f/Soccer_ball_animated.svg">
...and plain HTML
OK you need that to be online
 
@AndrasDeak this did it!
Thanks ;)
 
no problem:)
 
0
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...

now i got it
 
funky:)
 
11:23 AM
yeah haha
 
nice viridis you have there
 
@AndrasDeak You and your viridis :-)
 
don't let Adriaan see it:P
 
Euler problem 2:
matl 1HT`tTFF$t+t4e6>~]xN$vt2\~)sD
 
I wss going to close the question (which actually it may deserve) but I read the question and thougth "well, thet is actually cool , I should try it"
 
11:24 AM
@LuisMendo does it need a newer compiler?
command v not found in the last version
 
@AnderBiguri I don't remember doing anything special... stackoverflow.com/questions/31242427/…
 
I think its teh image size
so If the image is >2Mb then there is no prob
sorry <2Mb
 
@LuisMendo halp
Error using matl_compile (line 136)
MATL error while compiling: function v in statement number 18 not defined in MATL
Error in matl (line 194)
S = matl_compile(S, F, preLit, pOutFile, cOutFile, verbose);
 
but if its bigger, it doesnt upload it.
 
@AnderBiguri you can edit messages, you know;)
 
11:26 AM
aaah yes. I am too used to facebook!
 
@AnderBiguri don't you use skype? :P
 
@LuisMendo or is it the backticks again?
no, your message already seems to be verbatim-escaped
 
nahh, the GUI bothers me too much, plus it works horribly on my win10. I ended up just using facebook, and at work I open messenger.com, so I dont need all the noise of the dashboard
 
@LuisMendo and in R2012b I get an error from isprime that maximum is 2^32:(
 
@AndrasDeak Yeah, I just noticed that. Somehow the v function was missing. I've uploaded 30xi15 version which fixes that
 
11:36 AM
thanks, will try:)
4613732 for number 2:)
 
@AndrasDeak :-)
What was that isprime error?
 
>> matl '600851475143ttX^;\~ftbw/htZp)0)D'
MATL run-time error: The following MATLAB error refers to statement number 15: Zp
---
Error using isprime (line 24)
The maximum value of X allowed is 2^32.
Error in MATLc (line 300)
out{1} = isprime(in{1});
Error in run (line 64)
evalin('caller', [script ';']);
Error in matl_run (line 27)
run(cOutFile)
Error in matl (line 208)
matl_run(S, pOutFile, cOutFile, [])
>> 2^32
ans =
4.294967296000000e+09
quite straightforward
 
Hm. It runs correctly in 2015b
Seems Mathworks improved the function
Still, I don't think there's a number bigger than 2^32
Oh, yes, there is. My bad
 
:)
2^32+1 is greater:P
 
In the code, I meant :-P
:-D
You should really upgrade your Matlab!
 
11:41 AM
At least the matlab developers agreed with you in 2012;D
@LuisMendo but then how would I test matl for old versions?:P
But yeah, I should
but I've been transitioning to numpy, so there's not much pressure on me
 
@AndrasDeak Download old versions of MCR? :P
 
MCR?
 
I think it'¡s a component needed for standalone MAtlab programs
 
ooh, a runtime thingy?
never used those
 
Yes. Executable Matlab programs need that in order to run on a computer that doesn't have Matlab installed
Oh, now I see @Dev-iL's comment referred to the MATL compiler. Actually it runs on Matlab, so it doesn't use MCR. It consists of ordinary m-files
 
11:47 AM
@LuisMendo maybe he meant that I could compile MCR-based codes which call matl to test for older behaviour
 
@LuisMendo Can't you compile the MATL compiler to be a standalone app, thus using MCR?
 
12:06 PM
+10, meaning Nice answer, within 2 hours for merely posting 25 characters. Makes me sad :(
I'll refrain from overly elaborate answers from now on
 
@Dev-iL Ah, I see. That's a good idea. It would make it independent of the installed Matlab version. I'll look into that
 
@Adriaan At least it's closed as duplicate now
 
@Dev-iL I do like your comment on the other answer :P reminds me of the discussion @AndrasDeak and I had yesterday evening about some OP who also copied answers without citing sources
 
Well you know... My comment represents reality :)
 
@Dev-iL wouldn't that be OS-dependent?
 
12:18 PM
@AndrasDeak You are possibly right.. It's supposedly MCR-version dependent
WTF @ TMW: "* MATLAB Runtime 9.0, for R2015b, is intended to work with MATLAB 8.6, which is also R2015b."
 
lol:D
 
If Windows jumped from 8 to 10 (and Windows 7 is not actually the 7th), anything is possible
 
R2015b is Version 8.6, the runtime is on a separate release path
makes sense
 
@LuisMendo Windows 7 is "Windows v7.x" (consider: Windows 3.11, NT4, XP (v5), Vista (v6), Win7, Win8)
@excaza There must've been a better way to put it...
 
@Dev-iL But there's Windows 95, Windows 98, Windows ME
 
12:30 PM
95 98 ME are based on windows v4
 
Oh really? It makes more sense then
And Windows ME they just want to forget about. Understandable
 
AFAIK...
 
but, but,... windows ME is amazing!
 
@LuisMendo doesn't everyone want to forget about Windows in general?
 
@Ander Oh yes
 
Euler 4
matl '999H^;P"@YstP=!A?@X}]]D'
 
@LuisMendo <3
 
0.12%, that's like 2 glasses of Ardbeg innit?
 
@Dev-iL no argument from me, it's a pretty awful sentence
 
@Adriaan the joke is about 0.1337
 
12:41 PM
Euler 5
matl 'U20;"@Zm]D'
 
@AndrasDeak Well yea, but you still need a good supply of Ardbeg to get there
 
Ooooh Ardbeg
for some reason I thought you meant some beer and was additionally confused
@LuisMendo #5 works, #4 would need flip:)
 
Euler 6:
 matl '100;t!*tXdXd-Y)sD'
 
works
by which I mean it runs:P
 
@AndrasDeak Do you mean R2012b has flipdim, not flip?
@AndrasDeak I checked the solution in Google. It turns out to be 232792560 indeed for problem 5
 
12:46 PM
flipdinm fliplr, flipud yes; flipdim not
 
@LuisMendo flip was introduced in R2013b
 
> "Some of ADP's machines run on UNIX [an operating system favored by universities and start-ups in the '80s], but also Windows XP," said Fiacre, who works as an aviation security systems engineer.
WTF about unix:D As if it was some obscure shit running on C64s
 
And 25164150 for problem 6
 
@LuisMendo confirmed then:)
 
@AndrasDeak:
>Voyager 1 and Voyager 2, the two robotic probes that are used by NASA to study the outer solar system, rely on 250 kHz central processing units made by General Electric.

These 40 year-old computers are less powerful than today's pocket calculators, and use out-of-date programming languages like FORTRAN, which means that, with the impending retirement of the last engineer from the original Voyager mission, NASA will soon be recruiting a new expert on 1970s computer programming.
 
12:47 PM
Though I don't expect it to give an incorrect result, if it runs without errors
 
you interested in a NASA job? :D
 
@Adriaan LOL:D I only use f90+
 
@Adriaan WHAT DO YOU MEAN OUT OF DATED FORTRAM
 
my external suprv from CERN told me that they run of fortram :P
 
12:48 PM
@excaza AAAH sorry @LuisMendo I screwed up that message
once again:
fliplr, flipud, flipdim yes; flip not
sorrrry
and thanks @excaza
@AnderBiguri fortran can be fine if you use it with f90 or later, and do it properly
unfortunately, my people don't usually do that
 
@AndrasDeak hahaha well, if CERN runs on fortram I guess its not completely out of date
still, fortram sucks
in 2015
 
@AnderBiguri well, java sucks as well, yet so many people use it
@AnderBiguri if you have complexes or multidim arrays, fortran is the shit
 
Yes indeed. Donald Trump has tons of followers also
@AndrasDeak ye sI think they use it for that. High speed matrix sstuff
In CERN some shit is really hihg speed
 
@AnderBiguri yup
 
I mean they measure particles in a lap, and before the next lap they need to make decisions
and change sensors
 
12:53 PM
@AnderBiguri whoah
yeah, that's non-trivial
especially with a few GBps data streams
 
they have some crazy techology over there XD
like when they though particles where higer than speed of ligth XD And it was because some optic fiber curvature radious whas too hihg
making photons bounce more and take longer XD
imagine needing to make everything so so controled in the scale of things they have there
 
@AnderBiguri well they get a shitload of funding for a reason
this is one of the reasons:D
 
1:08 PM
Really fascinating read on New York's subway system: theatlantic.com/technology/archive/2015/11/…
 
1:21 PM
My addblock doesnt like that webpage :P
but seems interesting, saved for later
 
1:46 PM
@Dev-iL I don't think the question linked counts as a duplicate. Yes, it does have max(x,y) in the question body but it is in a completely different context. That question states that this command will return the array containing the maximum value (which is actually incorrect) whereas this question is about finding the element-wise maxima. Someone reading this question and not knowing the answer already, may very well not realise that that one line in the question of the duplicate is infact the answer as there is nothing there to contextualize it. — Dan 5 mins ago
 
@excaza damn that's interesting
 
@Dev-iL did Dan gold-badger-reopen the question?
 
@AndrasDeak He most certainly did
 
it was a blemish on his 12-upvote rtfm answer:P
 
Why would he not? It's a gold mine (pun intended)
 
1:58 PM
:D
 
@Divakar has more rep and he decided it should be closed :P
WW3? You betcha! ;)
 
Good morning
@LuisMendo lmfao windows ME, I used to have one of those... jesus it was retarded
 
@AndrasDeak so much gravitational potential, 25k rep has.
If I'd posted the exact same thing I'd be stuck below 5 upvotes :P
 
@Adriaan No need to theorize, some other person edited their answer to be exactly the same and only got 1 upvote... :)
 
@Dev-iL ah, no. Divakar posted some other solution, got 1 upvote, other dude has +2/-1, because he did initially have a different solution (some +3 votes), but changed to Dan's comment
 
2:05 PM
nvm, deleted
 
@Dan would min instead of max be an acceptable dupe? We're still talking about an rtfm-able question. — Andras Deak 1 min ago
 
@AndrasDeak very good :)
 
@AndrasDeak how do you get that line of dots on the left, like a citation?
 
Together we shall end the tyranny of the gold badges! ;)
 
@Adriaan whut? OH
 
2:07 PM
@Adriaan when you post a link to a comment it happens automatically
or start your reply with >
 
@Dev-iL yup @Adriaan, but otherwise quote with "> "
 
> like so
 
> like so?
 
> > Indeed.
 
2:10 PM
@excaza that might be stretching it:D
 
ba dum tss
Got a linked in connection request from someone named "Ibrahim Salami"
Hahahaha, what a hilarious name
 
0
Q: Find the max between two arrays and then concatenate the cells of the max array

ChristinaI wrote a Matlab code for that and it works well. But i would like to know if it's optimal or not. If not, so i need your help to write a more optimal code.. Firstly, i would like to explain the concept of my work: Let us consider 2 arrays tab1 and tab2. (are two arrays of matrices) First step...

^ And that is how many upvotes one should get for such an answer
 
+1 thankk youuu — Christina Nov 22 '13 at 8:13
OP lied balls :p
 
anybody else thinks that the avatars of D@n and bl@ are suspiciously similar?
 
2:22 PM
@Dev-iL simiilar, yes -- suspicious, no
 
@AndrasDeak there's no +1 on that answer :p
 
@Adriaan oooh haha:D
 
@AndrasDeak you say that because you and they are all the same person, and you're just trying to distract us
 
-3
Q: Matlab function with for, if and else

user1170540Stupid question!deleted! Apologies

 
@Adriaan OP had 21 rep that day
@Dev-iL busted:P
my avatar is also susp. similar
 
2:24 PM
@AndrasDeak You need 15 for an upvote no?
 
@excaza ruuuuuuuude
Why? This is a stupid exercise. — excaza 13 mins ago
@Adriaan do you?
I thought more
 
@excaza exactly:D
 
> 15 vote up Indicate when questions and answers are useful
 
oh ok then
@Adriaan I see you're putting that quote markup to good use:D
 
2:29 PM
@AndrasDeak I was disappointed at first, but it took 2 seconds to manifest itself in all its glory. I am a content man
 
@Adriaan yeah you're posting all sorts of content
 
@TroyHaskin @Adriaan
 
@excaza does OP see that?
 
That's what you'd see trying to delete your own post with an accepted answer
 
I see
then just unaccept:P
I'm sure it's related to upvotes as well
 
2:32 PM
@TroyHaskin it's not possible with an accepted answer afaik. — Adriaan 6 mins ago
is the reference
 
oh HA
 
@excaza Thanks for the info.
 
in your face @Adriaan
@Adriaan Ah! That makes sense. I was commenting from my previous perusals of meta. I've never asked a question. — TroyHaskin 5 mins ago
who's the boss;)
 
Clean up the comments before a mod does :P
 
mods don't have time to give detention
 
2:33 PM
@Adriaan Also, that comment thread isn't that bad from my experience.
Plus, I was able to rant.
 
And mods only notice if someone flags
 
I should have been faster on the CW, I feel dirty getting rep from that
:p
 
why?
 
because I don't think low effort questions should be answered
 
you made a real effort to a shitty problem, it's still an effort
 
2:35 PM
@excaza I only upvoted because of the fantastic name you gave your function :P
 
@Adriaan who's your hero?
Even though it seems like a minor point considering the silliness of the actual exercise, I just want to point out that it's not good practice to use i or j as loop variables since they're already reserved for the imaginary unit in MATLAB. — mikkola 18 mins ago
@Adriaan that's no moon function
@mikkola there's an extensive discussion in this answer on not using i or jAdriaan 15 secs ago
I believe you are preaching to the choir
 
@excaza I guess @ray didn't want this in the room description, so I'm going to have to pin this tag
 
@AndrasDeak reminds me of me. 660 rep in 40 days :P
@AndrasDeak once, so she can use the reference from now on :P
 
I can't star my own messages :(
 
@Adriaan she?
 
2:38 PM
@AndrasDeak that's what I interpret from the name
 
Hehehe :D
 
@Adriaan that's quite presumptuous:)
considering that 98% of users have at least one wang
Mikola, for instance, is an existing Hungarian family name
 
@AndrasDeak and as you fully well know my Hungarian is rather rusty :P
 
@Adriaan I was trying to motivate that it's much more likely that mikkola is a dude, if they didn't give any other sign to what their gender might be
unless you see an explicit female first name, assume a dude, if anything
and even then you can have surprises
Andrea is a female name here, but male in Italy
and I'm pretty sure some of the Christinas are 50-year-old male truck drivers
 
^lmao
@AndrasDeak Your girlfriends name isn't Christina by any chance is it?
 
2:43 PM
@Ballbreaker nope:P
 
hahah damn :D
 
2:54 PM
What's the most correct way to check if an array of doubles actually contains only integers? isequal(mat,round(mat)) ?
 
@AnderBiguri Rofl
 
@Dev-iL that feels rigth
 
Project Euler 7 in MATL:
U           % array of ones
10001       % number literal
;           % vector of equally spaced values
"           % for
  T         % logical row array literal
  `         % while
    1       % number literal
    +       % addition (element-wise, singleton expansion)
    t       % duplicate
    Zp      % true for prime numbers
    ~       % logical 'not' (element-wise)
  ]         % end
]           % end
D           % display
My first nested loop in MATL :-)
 
@Dev-iL Possible duplicate of How do I test for integers in MATLAB?
;)
 
2:58 PM
ufff, MATL looks like those scary codegolf languages now
 
@AnderBiguri that's kinda the point:P
 
Well, that's what it is :-)
 
haha ofc, it just scares me
 
As usual, it's scary to read it, not to write it
 
>> matl
U10001;"T`1+tZp~]]D
>
Reference to non-existent field 'source'.
Error in matl_compile (line 59)
str = intersect(plf, {S.source}); % only those functions that are actually used
Error in matl (line 194)
S = matl_compile(S, F, preLit, pOutFile, cOutFile, verbose);
 

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