2 ms·
I mean the composite types that Julia offers. I was originally trying to use it to replicate some of the structure array that Matlab offers. Understandably this
by syntaxing 10y ago
I mean the composite types that Julia offers. I was originally trying to use it to replicate some of the structure array that Matlab offers. Understandably this isn't the most efficient way to create a list, but it makes it so easy and clean to pass variables between functions when I'm trying to crunch some numbers quick. I tried getting used to calling sub-functions with a . (like Python) as well but didn't get too far.
- ced 10y agoI'm intrigued, could you give an example of the Matlab way?
- syntaxing 10y agoMost of MATLAB toolboxes and functions send most of their data between function this way. For instance, the GUIDE toolbox puts everything between handle functions and structure variables. If you wanted the button to look a certain way, all the information can be stored in one variable. For example (this is just an dummy example, I can't recall the exact syntax right now for GUIDE), the button variable will be: button1.color = 'blue', button1.size= [150,200], button1.position = [200,325], etc... Therefore when you only need to input and return one variable (Button1) for each element. It's a really convenient way to keep track of your variables.
- ced 10y agoInteresting. Maybe dictionaries would fill that role? Julia has macros, so you can usually implement other languages' syntactic convenience.