reads the property TickLength into the variable a and then you create a new variable XMinorTickLength containing a/2. Just naming a variable XMinorTickLength does not tell matlab to interpret this as a ticklength, it is just some value in your workspace. You need to
This tutorial describes the fitting of NODDI data using Matlab. The tutorial includes the link to the NODDI matlab toolbox, an example NODDI data set, and a step-by-step instruction on how to use the toolbox to analyze the example data set.
NODDI belongs to the family of diffusion MRI techniques underpinned by so-called multi-compartment models. Multi-compartment models interpret the MRI signals measured in each voxel as the sum of the contributions from the individual compartments that make up the voxel. This interpretation of the voxel-wise MRI signals confers the fundamental advantage of these models over the standard DTI, as well as the more recent diffusion kurtosis imaging (DKI). The metrics provided by DTI or DKI can only provide a composite view of the multifaceted contributions that may exist in a voxel. As a result, a change to DTI-drived FA may be caused by a host of underlying changes to the contributing compartments. In contrast, NODDI aims to disentangle the contribution from each compartment, thereby enabling their individualised characterisation. This distinction between DTI/DKI and NODDI is illustrated in Figure 1.
I have written this tutorial after finding myself helping many users who have treated DWI data as a black box and never ventured to explore the data. Not doing so often prevents one to realise early on that there might be something wrong with the raw data, which could be either easily resolved issues concerning data formatting or organisation or more serious issues concerning the quality of the data.
The NODDI google group keeps you up-to-date with the release of new versions with bug fixes and performance enhancement. It also provides a forum for you to send us your feedback and questions. So, please take a moment now to join the group by visiting
I hope you get to this point having successfully reproduced the step-by-step tutorial and are now ready to apply NODDI in your own studies. But if you do run into difficulties or have comments or suggestions, please don't hesitate to post them to the NODDI google group.
I am new to Julia and I am considering to adopt it in my professional life, where I often have to solve systems of partial differential equations (often mixed with algebraic and ordinary differential equations).
I typically discretize such systems in space manually and solve the semidiscretized system in time with some differential equation solver. So far, I am doing such work exclusively in Matlab and I would like to find out by how much faster (and potentially more elegant & readable) Julia can be for such endeavours.
To approach this question, I designed an example physical system that is similar in nature to what I encounter frequently in my professional life. The system of equations describes (under some assumptions) one dimensional flow of a gas through a porous solid structure, where heat is exchanged from gas to the solid matrix. In the solid matrix, a temperature-dependent chemical reaction is triggered. The governing equations are as follows:
In the following, I will consider a discretization of above system, for the time being with a spatial discretization into N = 100 control volumes, using upwind differencing. This yields a system of DAEs with gas temperature T_gas (in N discrete volumes) and mass flux \varrho u being algebraic solution variables and solid temperature T_sol and reactant concentration c_R being differential variables (both in N discrete volumes). For reasons of simplicity, I model gas mass flux \varrho u to be constant in the whole domain, so one equation is enough to describe that in the discretized state. In the case of N = 100, the overall DAE will have 301 equations. The system can be formulated in mass matrix form. Being a DAE system originating from a PDE semidiscretizations, my problem does not fully match the according DifferentialEquations.jl documentation, since they (as far as I have seen) mostly talk about ODE systems resulting from PDE semidiscretizations.
Baseline Matlab implementation
For systems of DAEs in mass matrix form, Matlab only offers two solvers (ode15s and ode23t), which is of course a huge disadvantage to how many solvers Julia offers.
Implementation of numerical solution in Julia
I read up a little on how to make differential equation solving in Julia fast (mainly from documentation of DifferentialEquations.jl and texts/talks by @ChrisRackauckas from here and there).
Based on that, I came up with a first implementation of the solution of above system in Julia, which I formulate in mass matrix form and solve using a variety of different solvers. I compare the benchmarked performances of that with a Matlab script that does the same, and I would like to see how much faster Julia can be for that task.
With above code, I typically already achieve a run time of the solve of 0.3 - 0.5 seconds. QBDF performs especially well with about 0.14s. This is of course already much better than the Matlab baseline, but I would like to see and learn whether more can be achieved.
In the equation for r_R, you see that I added a smooth multiplicative term making sure that the reaction rate approaches zero when the reactant concentration reaches zero. This is my standard approach, which usually works in my Matlab implementations. In the vicinity of zero concentration, when the smooth multiplicator becomes active, the solvers are forced to take small steps, leading to reduced performance. I am very open to criticism here and would love to hear better approaches (callbacks?) that work well in Julia in such situations.
[Answered by @vettert - thank you] I know that in order to get rid of the last few allocations in my DAE function, I need to broadcast / make broadcast fusion on the equations of Q and rR. However, when doing so, the solvers abort with MethodError: no method matching... followed by an - for me - uninterpretable and massive error message. What am I doing wrong?
I know that in order to get rid of the last few allocations in my DAE function, I need to broadcast / make broadcast fusion on the equations of Q and rR. However, when doing so, the solvers abort with MethodError: no method matching... followed by an - for me - uninterpretable and massive error message. What am I doing wrong?
Tools for building non-allocating pre-cached functions in Julia, allowing for GC-free usage of automatic differentiation in complex codes - GitHub - SciML/PreallocationTools.jl: Tools for building ...
Thank you for the warm welcome and especially for your assistance. In fact I was able to do the necessary changes you proposed to my code and now my DAE function is fully non-allocating That increased my performance by approximately 10%.
I suspect that this is due to how I defined parts of my parameter vector as dualcache. If I change my DAE function and parameter vector to not use dual cache variables at all, getting the sparsity works.
I was able to do so by having a second version of the DAE function which does not use dual cache, but otherwise is a 100% copy of the original DAE function. This is of course quite ugly, as I now have pretty much the same function twice. Is there a better way?
In the equation for r_R rRr_R , you see that I added a smooth multiplicative term making sure that the reaction rate approaches zero when the reactant concentration reaches zero. This is my standard approach, which usually works in my Matlab implementations. In the vicinity of zero concentration, when the smooth multiplicator becomes active, the solvers are forced to take small steps, leading to reduced performance. I am very open to criticism here and would love to hear better approaches (callbacks?) that work well in Julia in such situations.
When connecting to an Ethernet-based radio, a second NIC is recommended for the host computer to remain simultaneously connected to the radio and a network (or the Internet). Alternatively, you can use one NIC for the radio connection and WiFi to connect to a network. If the host computer has no WiFi and only one NIC, see Using One Ethernet Port.
USRP radios have a factory default IP address of 192.168.10.2. This value is used for the radio IP address throughout the setup instructions. If your radio has a different IP address, modify accordingly.
To install the Communications Toolbox Support Package for USRP Radio software and configure the host computer, use the recommended installer by following the Install Communications Toolbox Support Package for USRP Radio directions.
After completing the Communications Toolbox Support Package for USRP Radio installation, if you choose to manually set up the connection between the host and the radio, see the related topics included here.
knitro_qcqp for solving quadratically constrained quadratic programs (QCQPs) (this function can also be used to solve second order cone programs (SOCPs) by formulating the cone constraints as quadratic constraints);
795a8134c1