What is the Julia equivalent of "USE" in Fortran90?
Hi everyone, recently I’ve been working on a project of rule-based translator from Fortran to Julia. The project is 60% completed, but now I encountered conceptual problems and I need to decide...
View ArticleMakie scatter plot of vector of points
I would like to pass a vector of 3D points: v = Vector{Point3f0}(undef, 10) to scatter plot. Do I have to separate it into x, y and z columns first and call: scene = scatter(x, y, z, color = :red,...
View ArticleI can't find an example of accessing array element in "Arrays" chapter of...
I’m scanning “Arrays” chapter of Julia Manual and I don’t see syntax description and a simple example of accessing array element, e.g.: a = [3 1; 4 1] a[1, 2] a[1][2] I’m pretty sure, I’m missing...
View ArticleNamed tuples
I am experimenting with named tuples to store my parameters for code readability. I have noticed that although one can create a tuple with one element, it cannot be accessed via the dot notation: a =...
View ArticleTick align in Plots
Hi everyone, I amtrying to plot a simple scatter plot, but I want the y-axis ticks to be rotated 90 degrees. That is fine. However, the miss the alignment, staying below the tick mark. I want to align...
View ArticleI cannot not run juno via atom
Hi, every one, i am new to julia and i wanted to install juno via atom. for the life of me i cannot make it work. this is the first time ever to post something in a forum. i am desperate. My problem:...
View ArticleVertex neighbors in LightGraphs.jl
I am using LightGraphs.jl to implement a fast SIR algorithm, which I have done. However, I am now trying to improve the timings. In the course of investigating, I find that neighbors(g, v) allocates...
View ArticleWhy am I not getting a slower performance when a set the precision of...
I have experimented summing the elements of a BigFloat array while varying the precision of BigFloat arithmetic to see how it affects the perfomance. julia> a = rand(BigFloat, 80) 80-element...
View ArticleCheck for letters-only string
Python can check whether a string contain only letters with isalpha(): a_few = “abcdefghijk” a_few.isalpha() True mixed = “abc45defg” mixed.isalpha() False I have found Julia’s isletter() but it is...
View ArticleLooking for a simple surface plot with Makie
This is what I tried: using Makie, GeometryBasics, Colors surface([0.0, 1.0, 2.0], [0.0, 1.0, 2.0], rand(9)) and I’m getting: julia> surface([0.0, 1.0, 2.0], [0.0, 1.0, 2.0], rand(9)) ERROR: There...
View ArticleHow to recover the parameters of a parametric type?
Is there any function that receives a parametric type as input and returns the parameters? For example, does the function below exist? julia> get_parameters(Array{Float64, 2}) (Float64, 2) In case...
View ArticlePackages with different versions of a dependance
I have a piece of code using package A, and other piece using package B. Now I want to use them in the same project, but turns out packages A and B depend on a different version of a common dependence...
View ArticleTranslating Matlab code using Ctrl + f in Atom
Hi, I am translating code from Matlab. My text editor is Atom. I would like to know if I can change text using find function (ctrl + f) ignoring parts of the text as follows size(param.sval, 1); being...
View ArticlePyPlot: how to include a variable in a title
Hi, I have this loop in my code: for i=1:30 PyPlot.figure(i) if i < 3 PyPlot.plot(y[1:801],eigenfunction_approx[1:801,i]) PyPlot.title("Plot of the ${i}th eigenfunction") elseif i < 10...
View ArticleCombining LaTeX with variables in PyPlot title
This is somewhat similar to PyPlot: how to include a variable in a title, but with the added complication of including LaTeX in the title too. See I have this code: PyPlot.title(L"Plot of the 1st...
View ArticlePush! versus preallocation
@ChrisRackauckas I benchmarked a simple loop of 1,000,000 iterations using both push! and preallocation, both using functions and within the global space, and using const versus non-const arrays when...
View ArticleJuliaInXL installation error while building
Thank you for this wonderful language and the great support. I’d like to try JuliaInXL but during installation I receive the following error (Julia Pro 1.4.2., Windows 10, Office 365): image2297×1214...
View ArticleArrays with no size and/or non-sequential integers
I just stumbled on two phrases in the manual that puzzle me: In https://docs.julialang.org/en/v1/base/arrays/#Base.size it says Note that size may not be defined for arrays with non-standard indices,...
View ArticlePrinting a Julia file
I feel like an idiot asking this, but here goes. I have JuliaPro installed (on Windows 10) and I would like to send some code to my printer so that I have a list of the structures I’ve created to...
View ArticleWorking with CSV of MNIST sign language in Julia deep learning
Hello, I am trying to make a convolusional neural network on MNISt sign language dataset. It si provided in a CSV format where each row is one picture and there are 784 columns refering to a single...
View Article