# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=93

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 94

---

## [State Space Model with PID controller unstable in Julia compared to Matlab](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688)

<div class="topic-metadata">

**Author:** [@lstagner](https://discourse.julialang.org/u/lstagner)\
**Replies:** 22\
**Last updated:** [August 2, 2024, 11:23am UTC](https://discourse.julialang.org/t/state-space-model-with-pid-controller-unstable-in-julia-compared-to-matlab/117688 "2024-08-02T11:23:21Z")

</div>

I have the following code in Matlab that creates a stable system using a simple PID controller. %% Define system sys = ss(A,B,C,D); %% New state space sys\_new = sys(\[1379\],13); %% Define s domain Kp = 0; Ki = 0; % N…

---

## [Choosing colors for lines over heatmap](https://discourse.julialang.org/t/choosing-colors-for-lines-over-heatmap/117652)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 9\
**Last updated:** [August 1, 2024, 10:43pm UTC](https://discourse.julialang.org/t/choosing-colors-for-lines-over-heatmap/117652 "2024-08-01T22:43:09Z")

</div>

I have a heatmap in viridis or inferno and I want to draw grid lines on it but I don’t know what color to make them so they’re visible. Is there a good automatic or manual way to pick colors for this? let n = 500 f, ax,…

---

## [What can we learn from FastHTML?](https://discourse.julialang.org/t/what-can-we-learn-from-fasthtml/117663)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 8\
**Last updated:** [August 1, 2024, 5:10pm UTC](https://discourse.julialang.org/t/what-can-we-learn-from-fasthtml/117663 "2024-08-01T17:10:09Z")

</div>

Looks like Jeremy Howard has put quite a lot of thought into the design of FastHTML GitHub - AnswerDotAI/fasthtml: The fastest way to create an HTML app. It could be interesting to see what his demo app fasthtml/example…

---

## [How do you control the font size of a figure that is used in an academic publication?](https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713)

<div class="topic-metadata">

**Author:** [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Replies:** 9\
**Last updated:** [August 1, 2024, 1:28pm UTC](https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713 "2024-08-01T13:28:37Z")

</div>

Hi, everyone! I wonder how do you control the font size of a figure that is used in an academic publication, for example, if we plot the figure with Makie and write a paper with LaTex? Usually, we can tune in Julia both…

---

## [ESRI code for British National Grid not known by GeoIO](https://discourse.julialang.org/t/esri-code-for-british-national-grid-not-known-by-geoio/117641)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 22\
**Last updated:** [July 31, 2024, 2:19pm UTC](https://discourse.julialang.org/t/esri-code-for-british-national-grid-not-known-by-geoio/117641 "2024-07-31T14:19:56Z")

</div>

ERROR: LoadError: ArgumentError: EPSG/ESRI code for the ESRI ID "British\_National\_Grid" not found in dictionary. Please check https://github.com/JuliaEarth/CoordRefSystems.jl/blob/main/src/strings.jl If you know the EPSG…

---

## [Finding the reason of infeasibility in CPLEX](https://discourse.julialang.org/t/finding-the-reason-of-infeasibility-in-cplex/117686)

<div class="topic-metadata">

**Author:** [@ArmanZar](https://discourse.julialang.org/u/ArmanZar)\
**Replies:** 2\
**Last updated:** [August 1, 2024, 8:08am UTC](https://discourse.julialang.org/t/finding-the-reason-of-infeasibility-in-cplex/117686 "2024-08-01T08:08:24Z")

</div>

Hi everyone, I have an optimization problem and I solved it using CPLEX solver in JuMP. At the end, it gives a solution but the termination status is infeasible. I know that in IPOPT there is function primal\_feasiblity\_…

---

## [\[crosspost\] Bounties and mini grants for work on network simulation, Clifford circuits, quantum symbolics, and more](https://discourse.julialang.org/t/crosspost-bounties-and-mini-grants-for-work-on-network-simulation-clifford-circuits-quantum-symbolics-and-more/117715)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 0\
**Last updated:** [August 1, 2024, 4:16am UTC](https://discourse.julialang.org/t/crosspost-bounties-and-mini-grants-for-work-on-network-simulation-clifford-circuits-quantum-symbolics-and-more/117715 "2024-08-01T04:16:22Z")

</div>

Just now I posted in another subforum the newly funded (by NSF) bounties and mini grants for software development in quantum information science. Give the possible interface in this specific domain, I am cross-posting h…

---

## [Help porting to @mtkmodel DSL and a structural\_simplify error](https://discourse.julialang.org/t/help-porting-to-mtkmodel-dsl-and-a-structural-simplify-error/117648)

<div class="topic-metadata">

**Author:** [@sdwfrost](https://discourse.julialang.org/u/sdwfrost)\
**Replies:** 6\
**Last updated:** [August 1, 2024, 12:24am UTC](https://discourse.julialang.org/t/help-porting-to-mtkmodel-dsl-and-a-structural-simplify-error/117648 "2024-08-01T00:24:20Z")

</div>

I have an MTK model (ported from the epidemics R package where I build the model using a loop. How are symbolic arrays dealt with in the @mtkmodel DSL? I’ve tried a few things, but I can’t find what I need to port this m…

---

## [Delays shown in Nsight Systems between HtoD memcopy and kernel launch when using CUDA.jl](https://discourse.julialang.org/t/delays-shown-in-nsight-systems-between-htod-memcopy-and-kernel-launch-when-using-cuda-jl/117446)

<div class="topic-metadata">

**Author:** [@Cibin\_Joseph](https://discourse.julialang.org/u/Cibin_Joseph)\
**Replies:** 9\
**Last updated:** [July 31, 2024, 11:22pm UTC](https://discourse.julialang.org/t/delays-shown-in-nsight-systems-between-htod-memcopy-and-kernel-launch-when-using-cuda-jl/117446 "2024-07-31T23:22:04Z")

</div>

For the CUDA.jl minimal example shown below, I see a considerably large delay between the HtoD memcopy and the kernel launch. I’m not able to figure out what causes it. For a larger array, sometimes this delay is much le…

---

## [Test a package with a CUDA dependency through GitHub Actions CI](https://discourse.julialang.org/t/test-a-package-with-a-cuda-dependency-through-github-actions-ci/117702)

<div class="topic-metadata">

**Author:** [@huiyuxie](https://discourse.julialang.org/u/huiyuxie)\
**Replies:** 2\
**Last updated:** [July 31, 2024, 8:42pm UTC](https://discourse.julialang.org/t/test-a-package-with-a-cuda-dependency-through-github-actions-ci/117702 "2024-07-31T20:42:13Z")

</div>

Hi all! I am developing a new package integrating CUDA.jl as a dependency. However, I encountered errors indicating CUDA driver not found in CI when testing. I am using Standard GitHub-hosted runners and do not want to s…

---

## [Figure and font size when using \`Plots\`](https://discourse.julialang.org/t/figure-and-font-size-when-using-plots/117611)

<div class="topic-metadata">

**Author:** [@cmichelenstrofer](https://discourse.julialang.org/u/cmichelenstrofer)\
**Replies:** 8\
**Last updated:** [July 31, 2024, 7:34pm UTC](https://discourse.julialang.org/t/figure-and-font-size-when-using-plots/117611 "2024-07-31T19:34:10Z")

</div>

I am trying to save a plot at a specific size (in physical length units, like inches) and have the correct font size. The idea is that then I could just insert it into my LaTeX document without scaling and have the same …

---

## [Agent initialization](https://discourse.julialang.org/t/agent-initialization/117682)

<div class="topic-metadata">

**Author:** [@geoffD](https://discourse.julialang.org/u/geoffD)\
**Replies:** 0\
**Last updated:** [July 31, 2024, 2:45pm UTC](https://discourse.julialang.org/t/agent-initialization/117682 "2024-07-31T14:45:10Z")

</div>

Good morning, everyone. I have a model in which the @agent struct statement contains about 25 parameters for the agent. I would like to set this up such that I can specify default values and then overwrite one or two of …

---

## [Selecting agents of a specific class in agents.jl](https://discourse.julialang.org/t/selecting-agents-of-a-specific-class-in-agents-jl/117486)

<div class="topic-metadata">

**Author:** [@geoffD](https://discourse.julialang.org/u/geoffD)\
**Replies:** 9\
**Last updated:** [July 31, 2024, 11:01am UTC](https://discourse.julialang.org/t/selecting-agents-of-a-specific-class-in-agents-jl/117486 "2024-07-31T11:01:17Z")

</div>

Hi, I have an agents.jl model that uses two classes of GridAgent: Nurse and Patient. I’d like the step function to locate an available nurse and link them to an available patient: function nursepatient\_step!(nurse::Nur…

---

## [Using Multi-start with local MINLP solvers in Julia](https://discourse.julialang.org/t/using-multi-start-with-local-minlp-solvers-in-julia/117634)

<div class="topic-metadata">

**Author:** [@Lunima](https://discourse.julialang.org/u/Lunima)\
**Replies:** 1\
**Last updated:** [July 31, 2024, 8:17am UTC](https://discourse.julialang.org/t/using-multi-start-with-local-minlp-solvers-in-julia/117634 "2024-07-31T08:17:37Z")

</div>

Hi everyone! When reading the Knitro documentation I saw it could use a multi-start method to solver non-convex MINLP to global optimality even though it is a local solver. Is it possible to implement such a method in …

---

## [Custom layer in Lux](https://discourse.julialang.org/t/custom-layer-in-lux/117642)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 1\
**Last updated:** [July 31, 2024, 2:42am UTC](https://discourse.julialang.org/t/custom-layer-in-lux/117642 "2024-07-31T02:42:09Z")

</div>

Hi, I’m trying to implement a custom layer in Lux that is similar to a linear layer but needs to apply a user-defined mask to the weights. It needs to compute h(x) = g(b + (W ⊙ M)(x)) where g is an activation function…

---

## [ApproxFun Tutorials Discretization Error](https://discourse.julialang.org/t/approxfun-tutorials-discretization-error/117612)

<div class="topic-metadata">

**Author:** [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Replies:** 4\
**Last updated:** [July 30, 2024, 9:44pm UTC](https://discourse.julialang.org/t/approxfun-tutorials-discretization-error/117612 "2024-07-30T21:44:09Z")

</div>

How can the accuracy in the computed solution in the ApproxFun Tutorials be adapted/changed? Is there a way top set the number of basis functions being used for e.g. a coarse, intermediate and fine scale approximation? H…

---

## [Reading hdf5 files with ascii headers](https://discourse.julialang.org/t/reading-hdf5-files-with-ascii-headers/117632)

<div class="topic-metadata">

**Author:** [@Tim\_Hultberg](https://discourse.julialang.org/u/Tim_Hultberg)\
**Replies:** 0\
**Last updated:** [July 30, 2024, 2:25pm UTC](https://discourse.julialang.org/t/reading-hdf5-files-with-ascii-headers/117632 "2024-07-30T14:25:07Z")

</div>

In my program I have to read data from a large number of hdf5 files with a fixed size (3307) ascii header added. For now, I loop through the files and write a temporary file to disk without the disturbing ascii header a…

---

## [How do I make a Makie.jl recipe which defaults to 3D rendering?](https://discourse.julialang.org/t/how-do-i-make-a-makie-jl-recipe-which-defaults-to-3d-rendering/117631)

<div class="topic-metadata">

**Author:** [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Replies:** 2\
**Last updated:** [July 30, 2024, 1:44pm UTC](https://discourse.julialang.org/t/how-do-i-make-a-makie-jl-recipe-which-defaults-to-3d-rendering/117631 "2024-07-30T13:44:23Z")

</div>

I have a recipe that used to run fine with Makie 0.15. In the current Makie version (0.21) it renders as 2D unless I pass the keyword argument axis=(type=Makie.Axis3,). How can I make 3D rendering the default?

---

## [Plotting observed of DiscreteSystem](https://discourse.julialang.org/t/plotting-observed-of-discretesystem/117620)

<div class="topic-metadata">

**Author:** [@binnisb](https://discourse.julialang.org/u/binnisb)\
**Replies:** 4\
**Last updated:** [July 30, 2024, 10:52am UTC](https://discourse.julialang.org/t/plotting-observed-of-discretesystem/117620 "2024-07-30T10:52:47Z")

</div>

Hey. I wanted to try out MTK so I am moving an Excel calculation I had set up for calculating monthly repayments of a inflation linked loan to MTK. I got the model running. My issue is how to plot the observed values, …

---

## [Enable multiple Cores for Jupyter Lab](https://discourse.julialang.org/t/enable-multiple-cores-for-jupyter-lab/18658)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 12\
**Last updated:** [July 30, 2024, 8:25am UTC](https://discourse.julialang.org/t/enable-multiple-cores-for-jupyter-lab/18658 "2024-07-30T08:25:20Z")

</div>

I have found some resources on this online, but nothing which I actually is able to understand fully. I want to enable multiple cores when I run JupyterLab (also notebooks). This link (Setting JULIA\_NUM\_THREADS in an I…

---

## [How to speed up ipopt with HSL ma86 using parallel processing](https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567)

<div class="topic-metadata">

**Author:** [@Chi\_Jan](https://discourse.julialang.org/u/Chi_Jan)\
**Replies:** 7\
**Last updated:** [July 30, 2024, 2:42am UTC](https://discourse.julialang.org/t/how-to-speed-up-ipopt-with-hsl-ma86-using-parallel-processing/117567 "2024-07-30T02:42:18Z")

</div>

Hi community, I was previously using IPOPT with MUMPS (which is the default) to solve my problem, but the performance was a bit slow. I obtained an academic license for HSL and successfully downloaded and ran the code as…

---

## [Register array of symbolic functions](https://discourse.julialang.org/t/register-array-of-symbolic-functions/117602)

<div class="topic-metadata">

**Author:** [@Luca](https://discourse.julialang.org/u/Luca)\
**Replies:** 1\
**Last updated:** [July 30, 2024, 2:26am UTC](https://discourse.julialang.org/t/register-array-of-symbolic-functions/117602 "2024-07-30T02:26:13Z")

</div>

Dear all, I have the following issue with JuMP: I define an array of symbolic expression I want to use as constraint in a mathematical program. In particular, I have defined my function in the array gn and I want to wri…

---

## [Bar plot proportions with same bar height = 1](https://discourse.julialang.org/t/bar-plot-proportions-with-same-bar-height-1/117566)

<div class="topic-metadata">

**Author:** [@elisadonati23](https://discourse.julialang.org/u/elisadonati23)\
**Replies:** 6\
**Last updated:** [July 29, 2024, 10:52am UTC](https://discourse.julialang.org/t/bar-plot-proportions-with-same-bar-height-1/117566 "2024-07-29T10:52:45Z")

</div>

Hi all! Quite new into julia and struggling a lot with plots. I am moving from R and I cannot find a way to do a similar plot (using ggplot2) ggplot(propdf, aes(x = date, y = prop, fill = age\_year)) + geom\_bar(stat = …

---

## [Why step function doesn't recognise local model initialisation inside a function?](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 3\
**Last updated:** [July 29, 2024, 9:33am UTC](https://discourse.julialang.org/t/why-step-function-doesnt-recognise-local-model-initialisation-inside-a-function/117586 "2024-07-29T09:33:45Z")

</div>

Here is my function where I try to run ABM model inside a function. Now inside this function when I initialise model it works and also prints model but while using step!() it says model is not defined. Can someone shed …

---

## [Running EBM model in a function](https://discourse.julialang.org/t/running-ebm-model-in-a-function/117512)

<div class="topic-metadata">

**Author:** [@Sahil\_Khan](https://discourse.julialang.org/u/Sahil_Khan)\
**Replies:** 1\
**Last updated:** [July 29, 2024, 9:28am UTC](https://discourse.julialang.org/t/running-ebm-model-in-a-function/117512 "2024-07-29T09:28:25Z")

</div>

Hello everyone, Im running EBM model inside a function which is causing issue with calling model properties values. Is there a way to extract them inside function? General Idea of my function: model = model\_initiate()…

---

## [Obtaining a projection onto the range of a matrix through its QR decomposition](https://discourse.julialang.org/t/obtaining-a-projection-onto-the-range-of-a-matrix-through-its-qr-decomposition/117334)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 4\
**Last updated:** [July 29, 2024, 8:26am UTC](https://discourse.julialang.org/t/obtaining-a-projection-onto-the-range-of-a-matrix-through-its-qr-decomposition/117334 "2024-07-29T08:26:42Z")

</div>

Given a matrix A, I want to compute a matrix with rank(A) column vectors that span the range of A. With an SVD, this can be done with: import LinearAlgebra as LA function ortr\_svd(A::AbstractMatrix{T}) where {T\<:Number}…

---

## [Simple Algebra in MTK](https://discourse.julialang.org/t/simple-algebra-in-mtk/117327)

<div class="topic-metadata">

**Author:** [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Replies:** 5\
**Last updated:** [July 29, 2024, 7:16am UTC](https://discourse.julialang.org/t/simple-algebra-in-mtk/117327 "2024-07-29T07:16:10Z")

</div>

Another beginner question… To what extent can I solve equations in MTK? using ModelingToolKit @mtkmodel Scratch begin @variables begin x(t) y(t) end @equations begin x ~ 3y + 10 y ~ 2x - 5 end e…

---

## [Tips for handling large Datasets with a lot of preprocessing](https://discourse.julialang.org/t/tips-for-handling-large-datasets-with-a-lot-of-preprocessing/117551)

<div class="topic-metadata">

**Author:** [@felix12123](https://discourse.julialang.org/u/felix12123)\
**Replies:** 1\
**Last updated:** [July 27, 2024, 8:24pm UTC](https://discourse.julialang.org/t/tips-for-handling-large-datasets-with-a-lot-of-preprocessing/117551 "2024-07-27T20:24:50Z")

</div>

Hello, i am currently trying to machine learn a local relation between two 2D arrays. Consider the two 2D CircularArrays A and B of the same size. I want to predict the value of B\[x,y\] with the region A\[x-r:x+r, y-r:y+…

---

## [ForwardDiff tagcount with custom diff rules](https://discourse.julialang.org/t/forwarddiff-tagcount-with-custom-diff-rules/117534)

<div class="topic-metadata">

**Author:** [@dchang10](https://discourse.julialang.org/u/dchang10)\
**Replies:** 4\
**Last updated:** [July 27, 2024, 4:00pm UTC](https://discourse.julialang.org/t/forwarddiff-tagcount-with-custom-diff-rules/117534 "2024-07-27T16:00:26Z")

</div>

I’m writing a custom gradient for a function that takes two derivatives using ForwardDiff. I receive an error unless I specify the tag for the returned Dual. I figured that the tag I should return depends on the tag coun…

---

## [Eigenvectors differ between julia and Wolfram/Delphi](https://discourse.julialang.org/t/eigenvectors-differ-between-julia-and-wolfram-delphi/117532)

<div class="topic-metadata">

**Author:** [@jacques1](https://discourse.julialang.org/u/jacques1)\
**Replies:** 2\
**Last updated:** [July 26, 2024, 11:58pm UTC](https://discourse.julialang.org/t/eigenvectors-differ-between-julia-and-wolfram-delphi/117532 "2024-07-26T23:58:31Z")

</div>

I am trying to find the eigenvectors of a matrix: t = \[124.70244538509718 -120.72494594206698; -120.72494594206698 122.53090477427045\] Using eigvecs from linear algebra, I get eigvecs(t) 2×2 Matrix{Float64}: -0.7039…

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=92)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=94)
