« first day (2114 days earlier)      last day (1099 days later) » 

11:31 AM
@LuisMendo this guy has some great lectures about (analog) synths - it's probably all trivial for you though:) youtube.com/c/Lantertronics
and thanks to your help I sometimes even understand when he's talking about this laplace transforms/transfer functions!
 
12:01 PM
@flawr Haha yes, Laplace transforms are very useful for the analysis and design of electronic circuits
 
yeah, I've Laplaced everything in my undergrad
(I did elec eng)
but with Laplace
 
12:53 PM
@AnderBiguri oh I didn't know. Now I know who else to pester with questions about this stuff:)
 
yeah, im a proper oompa loompa, elec eng bsc and msc
 
 
2 hours later…
2:38 PM
Does anyone understand this problem? stackoverflow.com/questions/67083239/…
 
you can ask @user2305193
 
seems that they are trying to do a anoynimous function with arbitrary input variables
feels like a loop would be a much better option
 
heretic, who uses loops? FP FTW
 
maybe can be rewrite to just use arrayfun tho
I think its that. Someone knowing about cellfun and not arrayfun and trying to use it for an array
or am I missing something?
 
It seems that deal() is what @user2305193 is looking for.
 
2:53 PM
@flawr A function call can never produce a comma separated list of values. deal produces nargout output values, and nargout is 1 in this case, because it is not called with [x,y,z]=..., which is the only way to get multiple output arguments. AFAIK.
But it is the premise of the question that I struggle with.
 
I just assumed they wanted to condense the last two lines into one line
 
Hi, sorry for the silly question, if it's ok @flawr I think I would delete it. The premise is that I work with a repo, where, unlike other functions that use grouping variables to separate data, people decided (and I'm only realizing now that this is rather unconventional) to use cell-arrays and varargin to separate data. plot_it would take data{1} and data{2}, then would be called with plotit(data{:}) without a grouping variable
 
Yeah, I think that's what they are asking. But I don't understand why they need those lines to start with. I think the anonymous function is an example arbitrary function that takes input values as separate parameters, rather than a single array.
 
O think that unders those constraints, you just need to do what you do in the question
which is a reason to not do that in the first place :D
but not sure if there is a solution though
 
I guess... on the other hand I can see how it's intuitive to not need a grouping vector
 
2:59 PM
@user2305193 Is it a public repository?
 
no I don't think so
 
structs exist for this too.
 
would that make anything easier?
 
Is this plot_it called with many input arguments, as your question suggests? Or is it always a fixed number of them? Is it possible to rewrite their interface? Or write a new interface around their functions?
 
yeah, no that can be done easily
 
3:02 PM
'cos it sounds like a poorly designed interface... :/
 
I guess it makes sense if your data is in cell format in the first place
yees... no hope for that @colon function for cell arrays then
sorry to bug you guys
 
But it doesn't make sense to have a cell array with scalar values in it. That is not what cell arrays are for, and the memory overhead is staggering.
 
and the compute overhead, you effectively disable all vectorization acceleration MATLAB has
@user2305193 no worries, its the purpose of SO/this chat
 
the reason for that is multiple 3D matrices I guess, that you want to manipulate individually at later time, and then concatinate according to your liking in one of the three dimensions
since they differ in at least 2 dimensions, they're just basket-ed into a cell array
 
yeah, but I use 3D matrices all day for years, and cells are not really the thing I use to contain them
 
3:06 PM
hm. do you cat them in 4D then, or what do you do?
 
And also that's not the example you gave. I think it is the example that really confused me. :)
 
feels that it would be much better to have structs for example (depending on the application/meaning of these matrices)
 
@CrisLuengo yeah... I can see that in retrospect, it was a bad example
 
@user2305193 well, admitedly in my case sizes tend to match
 
and RAM is a bit less of an issue where I work, maybe that adds some explanations... :/
 
3:07 PM
if you update your example with a cell array with 2 elements and 2 3D matrices, I think it makes for a better question
@user2305193 My PC has 128GB, quite a dongrade from my previous job :D
 
I think that, if you can store all the data as a single numeric array, as you apparently can (given your myvar example), then that is the best way to store the data. But then the functions should be able to take the data in that form and use it in that form.
 
haha @AnderBiguri
 
If data is composed of heterogeneous arrays, then a cell array is appropriate to store it.
Your problem exists because you can store your data as a single array, and sometimes that is the appropriate way to process it, but then there's another function that requires that data as separate arrays. So you end up converting back and forth between numeric and cell arrays. I don't think you can avoid this conversion.
 
I think I couldn't have put it better @CrisLuengo
 
It's unfortunate that MATLAB cannot have the cell array reference the data in the original array. If this is larger data, the conversion requires lots of memory.
 
3:26 PM
(I think structs do this though)
if your data is not just "data" and its meaningfull, then it makes sense to lump it together with names
I mean, a class would be better, but have never done anything classy with MATLAB
2
 
3:40 PM
@AnderBiguri D: how much did you have?
 
double that
with space to quadruple that, maybe nowadays it has it
This is how I got to recosntruct an image of a coffee bean, famously very large
 
@AnderBiguri There's probably around 50 of those in each cup of espresso I drink. Does that fit in your RAM? Because it certainly fits into my espresso machine... :p
 
its because its a solid-state machine, your expresso
 
Well, it involves a liquid state too...
Complex physics going on there, I assure you!
 
I once attended a talk from a cambridge matematician that did a complex PDE system of equations to simulate water trhough coffee, to mathematically model what the best coffee would be
which made me really wonder
why do we let this people use public money for research
:P
 
3:46 PM
LOL!
 
yeah, why waste it on such an atrocious beverage:P
 
hahaha, they are Brits, it should have been Tea!
 
I love how mathematicians think they can model something that they don't understand.
 
likely dude was all overcaffeinated when he though of it :D
 
Not saying he didn't understand coffee, just saying nobody understands coffee extraction. So you can model water through coffee, but that doesn't tell you how good the coffee will be.
 
3:49 PM
this is the paper/talk XD
they had a proper barista too
 
Damn, that actually sounds interesting...
 
yeah XD
they took it extremely seriously
I like that the first author is indeed the barista
 
The acknowledgments are funny. They used personnel and coffee provided by Frisky Goat Espresso. "Frisky Goat" sounds like a British pub, but we all know brits don't know what espresso is...
 
hahaha
its an Australian coffee bar actually XD
 
Yes, I just googled it.
That makes more sense.
And they found a coffee coating company in the US to work with: "We thank Tailored Coffee Roasters, Eugene, OR, for their implementation of the procedures detailed herein"
A multi-national endeavor.
 
3:56 PM
this is the future of research, its CERN v2
ISS, but better
 
LOL!
 
 
3 hours later…
6:33 PM
 
hehehehe
 
 
5 hours later…
11:06 PM
wanted to add shading to my linear regression line (in a scatter plot)... can this be done with shading instead of dotted lines? I couldn't figure this one out yet... not that it's important for science, I just think it's somewhat ugly
@flawr gold, lol
 
Shading how?
 
the confidence bound, hold on, I'll post an example
 
Oh, you probably mean a background patch
 
yeah
sorry, didn't understand that the actual shading was the question
patch with some transparency setting usually works great
instead of this
(you have to click the 'image not found' to see the example)
 
It was a bit misleading when you said "in a scatter plot" because the scatter part has nothing to do with your question
@user2305193 they load for me
 
11:14 PM
I guess that's right @AndrasDeak, thou shalt not be mislead by n00biness
 
you can probaby manipulate the returned graphics array
> If mdl includes one or more predictors, then h(1), h(2), h(3), and h(4) correspond to adjusted data points, the fitted line, and the lower and upper bounds of the fitted line, respectively.
at worst you can probably extract the confidence bounds from the latter two and create a patch
the actual MATLAB users of the room might be more useful
 

« first day (2114 days earlier)      last day (1099 days later) »