« first day (2139 days earlier)      last day (1083 days later) » 

12:28 PM
consider this oneliner [x,y] = deal(x*.3, y*.3);, here I'm scaling both x and y by .3. Is it possible to do the same but sucht that .3 only appears once? (it still has to be a oneliner and still has to overwirte the two arrays x, y with their scaled versions.)
And no it is not about a practical solution, I was just wondering whether that was possible:) I considered cellfun but didn't get it to work as a oneliner.
 
1:28 PM
[a,b] = deal(cellfun(@(v)0.3*v, {x, y}, 'un', false){:})
@flawr is this ^ valid MATLAB?
 
@AndrasDeak I guess the ){:} is not gonna work
let me try
 
hmm, yeah
only {}() is allowed if memory serves
 
I don't think that is allowed either
 
Surprisingly it is.
I think there's even an error that tells you as much
maybe not; it's been a while
 
I get "unbalanced or unexpected parenthesis or bracket" for these kind of expressions
 
1:35 PM
huh
 
I'm pretty sure indexing always requires a name
 
I was sure that cell+array indexing was allowed
 
Or is it maybe a matter of versions? (I tried it in 2017b)
 
last one I had was 2014b or so
 
I don't use matlab all that much anymore but I still dread the day I won't have access to it anymore:/
It's just too convenient and quick for plotting stuff
 
1:41 PM
Like python? ;)
or octave :D
 
I find both quite a bit slower (at least with matplotlib/gnuplot)
 
For plotting?
What runtimes are we talking about? :P
for what it's worth sympy can probably do the equivalent of ezplot docs.sympy.org/latest/modules/plotting.html
 
like 0.5s (matlab) to 1.5-2s (the others)
I should look into sympy a little bit more
or sage
 
I don't think it takes that long for me to plot stuff, although my usual plotting things involve calculations too
 
Actually I should also try the newest octave version, I haven't updated it in a while
For me it's mostly just checking if a formula make ssense or e.g. visualizing some coordinate transformation etc
so it also includes some computation but nothing heavy usually
the new octave version dies indee seemt o be a little bit faster
 
1:48 PM
 
sorry this was my autocorrection. It sometimes has to dump back all the mistakes it accumulated if it runs out of memory
@AndrasDeak do you know is there an "in-/decrement and run" function somewhere in octave?
 
I exclusively use octave-cli
and that's also almost never
I never did clicky clicky in matlab either
 
D:
 
if I want to increment a value I'll edit it myself :P
 
but do you know the widget I'm taling about?
(rightclick on number in matlab)
 
1:54 PM
yes
Well, I didn't know about the tooltip, but the same feature in the toolbar
 
 
1 hour later…
2:54 PM
I didn’t even know this was possible.
@AndrasDeak You can mix and match subsref actions in every way in MATLAB, except nothing can come after (). Since a few versions ago, you can now do . after (). But still no () or {}.
This is one of the limitations that I don’t understand. It’s frustrating.
Actually, I guess (). was legal if the parentheses were indexing, now it also is if they’re a function call.
I have been warning to be able to do (){} on an object for 20 years now, but it’s still illegal.
 
yeah, it's silly
 
3:23 PM
> I need to finish this today, the deadline is tomorrow. It's 4:42 pm 9th of May 2021 CEST now.
So precise about when the answer needs to come in... Oh well.
 
I don't think that's the deadline :D
 
3:44 PM
Lol. Yeah, he’s saying how much time he’s got until the deadline. But not telling us at what time he goes to bed. :p
 
caveat askor
 
@CrisLuengo Great edit summary
 
4:04 PM
@LuisMendo Well, I did explain that in a comment first. They then updated the question, but didn’t remove the deadline part.
 

« first day (2139 days earlier)      last day (1083 days later) »