# \#matlab

**URL:** https://discourse.julialang.org/tag/matlab/89.md?match_all_tags=true&page=2&tags%5B%5D=matlab

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

**Page:** 3

---

## [\[ANN\] Mex.jl](https://discourse.julialang.org/t/ann-mex-jl/70816)

<div class="topic-metadata">

**Author:** [@taylormcd](https://discourse.julialang.org/u/taylormcd)\
**Replies:** 0\
**Last updated:** [November 2, 2021, 4:41pm UTC](https://discourse.julialang.org/t/ann-mex-jl/70816 "2021-11-02T16:41:05Z")

</div>

Mex.jl is a new package which embeds Julia in the MATLAB process. It’s based on the old mexjulia project, but is compatible with later versions of Julia and assembled as a Julia package for easy installation and use. F…

---

## [How to read tables out of a MAT file?](https://discourse.julialang.org/t/how-to-read-tables-out-of-a-mat-file/70098)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 11\
**Last updated:** [October 21, 2021, 8:55pm UTC](https://discourse.julialang.org/t/how-to-read-tables-out-of-a-mat-file/70098 "2021-10-21T20:55:00Z")

</div>

Normally, this is how I read a variable out of a MAT file: using MAT F1 = matopen("test.mat"); Var1 = read(F1, "Var1"); close(F1); Now I have some Matlab tables stored in the MAT file. Below is an example: Name …

---

## [My wishlist for the next version of Julia](https://discourse.julialang.org/t/my-wishlist-for-the-next-version-of-julia/69987)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 64\
**Last updated:** [October 19, 2021, 9:22pm UTC](https://discourse.julialang.org/t/my-wishlist-for-the-next-version-of-julia/69987 "2021-10-19T21:22:56Z")

</div>

As a Matlab person who recently switched over to Julia, below are some items on my wish list. Many thanks for your consideration! Creating a m x n sized NaN should be as simple as NaN(m, n). Right now, I have to do th…

---

## [Set MATLAB\_ROOT environment variable](https://discourse.julialang.org/t/set-matlab-root-environment-variable/69815)

<div class="topic-metadata">

**Author:** [@moeinkh88](https://discourse.julialang.org/u/moeinkh88)\
**Replies:** 0\
**Last updated:** [October 15, 2021, 10:39am UTC](https://discourse.julialang.org/t/set-matlab-root-environment-variable/69815 "2021-10-15T10:39:44Z")

</div>

Hi! I have tried Pkg.build(“MATLAB”) and I got the following error: ERROR: Error building MATLAB: ERROR: LoadError: MATLAB cannot be found. Set the “MATLAB\_ROOT” environment variable to the MATLAB root directory and r…

---

## [How to store Julia variables and matrices like mat files in MATLAB](https://discourse.julialang.org/t/how-to-store-julia-variables-and-matrices-like-mat-files-in-matlab/69571)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 4\
**Last updated:** [October 11, 2021, 4:36pm UTC](https://discourse.julialang.org/t/how-to-store-julia-variables-and-matrices-like-mat-files-in-matlab/69571 "2021-10-11T16:36:57Z")

</div>

I just switched from Matlab to Julia. One thing I’m trying to figure out is how to store my variables in Julia like mat files in Matlab? For example, in Matlab I would do this: save(‘test.mat’, ‘Var1’, ‘Var2’, ‘Var3’); …

---

## [Porting MATLAB code that uses Mapping Toolbox](https://discourse.julialang.org/t/porting-matlab-code-that-uses-mapping-toolbox/68967)

<div class="topic-metadata">

**Author:** [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Replies:** 1\
**Last updated:** [September 29, 2021, 10:27pm UTC](https://discourse.julialang.org/t/porting-matlab-code-that-uses-mapping-toolbox/68967 "2021-09-29T22:27:35Z")

</div>

Looking for opinions/options… I’ve got some old MATLAB code that makes use of Mapping Toolbox that I want to port into Julia. What’s my best bet? Thanks.

---

## [Question on Calling Julia functions from C++ with CxxWrap (and Eventually Interfacing with Julia from MATLAB)](https://discourse.julialang.org/t/question-on-calling-julia-functions-from-c-with-cxxwrap-and-eventually-interfacing-with-julia-from-matlab/68378)

<div class="topic-metadata">

**Author:** [@GrantHecht](https://discourse.julialang.org/u/GrantHecht)\
**Replies:** 2\
**Last updated:** [September 25, 2021, 8:08pm UTC](https://discourse.julialang.org/t/question-on-calling-julia-functions-from-c-with-cxxwrap-and-eventually-interfacing-with-julia-from-matlab/68378 "2021-09-25T20:08:28Z")

</div>

Hello everyone, I have a relatively unique use case for Julia and CxxWrap.jl. To provide some background, my current research involves employing heuristic optimization algorithms to assist in solving spacecraft trajecto…

---

## [How to skip arguments when using a function](https://discourse.julialang.org/t/how-to-skip-arguments-when-using-a-function/68621)

<div class="topic-metadata">

**Author:** [@Giulio\_Benedetti](https://discourse.julialang.org/u/Giulio_Benedetti)\
**Replies:** 9\
**Last updated:** [September 24, 2021, 5:51pm UTC](https://discourse.julialang.org/t/how-to-skip-arguments-when-using-a-function/68621 "2021-09-24T17:51:56Z")

</div>

Hi there! Is there a way in Julia to skip arguments when using a function? I am looking for something like the tilde in MATLAB: # MATLAB MyFunction(a, ~, c) Thanks in advance!

---

## [HDF5 error occuring when using MAT package](https://discourse.julialang.org/t/hdf5-error-occuring-when-using-mat-package/68335)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 2\
**Last updated:** [September 17, 2021, 2:38pm UTC](https://discourse.julialang.org/t/hdf5-error-occuring-when-using-mat-package/68335 "2021-09-17T14:38:11Z")

</div>

I am getting the following error when trying to use the MAT package. I have no clue about how to interpret it. Any help would be appreciated. julia\> file = matopen("t.mat", "w"); HDF5-DIAG: Error detected in HDF5 (1.12.…

---

## [Statistics in Julia good enough for my course?](https://discourse.julialang.org/t/statistics-in-julia-good-enough-for-my-course/67409)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 15\
**Last updated:** [September 7, 2021, 2:51pm UTC](https://discourse.julialang.org/t/statistics-in-julia-good-enough-for-my-course/67409 "2021-09-07T14:51:30Z")

</div>

I am starting a Statistics course tomorrow, as an undergrad. While prepping for class, I met the following statement: The faculty I am in at my school swears to MatLab for most things, and I have followed courses on …

---

## [\[ANN\] JuliaFromMATLAB.jl - Call Julia from MATLAB](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882)

<div class="topic-metadata">

**Author:** [@jondeuce](https://discourse.julialang.org/u/jondeuce)\
**Replies:** 7\
**Last updated:** [August 25, 2021, 11:50am UTC](https://discourse.julialang.org/t/ann-juliafrommatlab-jl-call-julia-from-matlab/66882 "2021-08-25T11:50:24Z")

</div>

Inspired by this recent discussion regarding the state of calling Julia from MATLAB, I have put together a package to try to resolve some of the issues faced by previous approaches: JuliaFromMATLAB.jl. Please scroll down…

---

## [Conversion from Matlab to Julia](https://discourse.julialang.org/t/conversion-from-matlab-to-julia/66317)

<div class="topic-metadata">

**Author:** [@Chaitanya](https://discourse.julialang.org/u/Chaitanya)\
**Replies:** 40\
**Last updated:** [August 22, 2021, 1:16pm UTC](https://discourse.julialang.org/t/conversion-from-matlab-to-julia/66317 "2021-08-22T13:16:14Z")

</div>

Hello Everyone. I have recently shifted to Julia from matlab. Storing data in julia with for loops has been a trouble for me Here, is the simple matlab code. I would appreciate if anyone could help me out the conversio…

---

## [Create an array using the output of size()](https://discourse.julialang.org/t/create-an-array-using-the-output-of-size/66326)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 4\
**Last updated:** [August 13, 2021, 11:15am UTC](https://discourse.julialang.org/t/create-an-array-using-the-output-of-size/66326 "2021-08-13T11:15:33Z")

</div>

Matlab: a = -1.3077 3.5784 3.0349 -0.4336 2.7694 0.7254 0.3426 -1.3499 -0.0631 \>\> zeros(size(a)) ans = 0 0 0 0 0 0 0 0 0 julia\> a 3×3 Matrix{Float64}…

---

## [Calling Julia from Matlab - the smoothest path to sneak Julia into a company](https://discourse.julialang.org/t/calling-julia-from-matlab-the-smoothest-path-to-sneak-julia-into-a-company/64845)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 10\
**Last updated:** [July 23, 2021, 6:41am UTC](https://discourse.julialang.org/t/calling-julia-from-matlab-the-smoothest-path-to-sneak-julia-into-a-company/64845 "2021-07-23T06:41:50Z")

</div>

I would have loved to see such an announcement. The search on this topic is frustrating, the developments appear to have ended in 2018. I see these possible routes One like in Mex.jl and others, using a mexjulia.cpp…

---

## [Solving non-linear equations with anonymous function](https://discourse.julialang.org/t/solving-non-linear-equations-with-anonymous-function/64934)

<div class="topic-metadata">

**Author:** [@bozgulec](https://discourse.julialang.org/u/bozgulec)\
**Replies:** 1\
**Last updated:** [July 19, 2021, 9:17pm UTC](https://discourse.julialang.org/t/solving-non-linear-equations-with-anonymous-function/64934 "2021-07-19T21:17:58Z")

</div>

Hello Dear Julians, I’m currently translating a code from MATLAB to Julia and I got stuck at reformulating a non-linear differential equation problem. The code in MATLAB is as follows, for i = 1:numel(rrangeopt) r = …

---

## [Calling julia code from matlab](https://discourse.julialang.org/t/calling-julia-code-from-matlab/58598)

<div class="topic-metadata">

**Author:** [@Noodle](https://discourse.julialang.org/u/Noodle)\
**Replies:** 3\
**Last updated:** [July 18, 2021, 6:42am UTC](https://discourse.julialang.org/t/calling-julia-code-from-matlab/58598 "2021-07-18T06:42:36Z")

</div>

Hello everyone I am trying to call Julia codes from MATLAB, as I need to send my Julia code to a MATLAB user. It seems for Julia \>1.0 the solution is GitHub - byuflowlab/Mex.jl: Embedding Julia in the MATLAB process. I…

---

## [How to get eigenvalues to take the same order as in Matlab](https://discourse.julialang.org/t/how-to-get-eigenvalues-to-take-the-same-order-as-in-matlab/63580)

<div class="topic-metadata">

**Author:** [@AngusRussell](https://discourse.julialang.org/u/AngusRussell)\
**Replies:** 10\
**Last updated:** [June 26, 2021, 11:01pm UTC](https://discourse.julialang.org/t/how-to-get-eigenvalues-to-take-the-same-order-as-in-matlab/63580 "2021-06-26T23:01:30Z")

</div>

So I am rewriting some code from Matlab into Julia. I want the final plots to be the same however Julia is sorting the eigenvalues in ascending order which is making the plot confusing for my use case. The following plo…

---

## [IFFT function in julia](https://discourse.julialang.org/t/ifft-function-in-julia/63454)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 7\
**Last updated:** [June 23, 2021, 7:56pm UTC](https://discourse.julialang.org/t/ifft-function-in-julia/63454 "2021-06-23T19:56:33Z")

</div>

I am trying to implement the below matrix computation from matlab in julia. But the ifft function gives different output than obtained in matlab a = zeros(5,10); for i = 1:5 a(i,:) = ifft((c(i,:).\*(d))); end w…

---

## [Getting different output for fft function in julia and matlab](https://discourse.julialang.org/t/getting-different-output-for-fft-function-in-julia-and-matlab/63349)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 4\
**Last updated:** [June 22, 2021, 9:42am UTC](https://discourse.julialang.org/t/getting-different-output-for-fft-function-in-julia-and-matlab/63349 "2021-06-22T09:42:29Z")

</div>

In JULIA, 2×5 Array{Float64,2}: 0.801514 1.21987 1.1503 1.18761 1.2485 0.807469 1.22325 1.14981 1.1877 1.24861 when fft function from FFTW.jl on the above array gives output: 2×5 Array{Complex{Float64},2}: …

---

## [containers.Map(keyset, valueset) from Matlab to Julia](https://discourse.julialang.org/t/containers-map-keyset-valueset-from-matlab-to-julia/62768)

<div class="topic-metadata">

**Author:** [@GAiello](https://discourse.julialang.org/u/GAiello)\
**Replies:** 1\
**Last updated:** [June 13, 2021, 1:26am UTC](https://discourse.julialang.org/t/containers-map-keyset-valueset-from-matlab-to-julia/62768 "2021-06-13T01:26:18Z")

</div>

Hello Everybody, Is there in Julia something similar to Matlab’s command containers.Map(keyset, valueset)? Thank you very much

---

## [Error precompiling MATLAB.jl](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399)

<div class="topic-metadata">

**Author:** [@PaoloVarraso](https://discourse.julialang.org/u/PaoloVarraso)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 10:09am UTC](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399 "2021-05-20T10:09:06Z")

</div>

Hi, I am trying to use the MATLAB.jl package on my Mac. The installation seems successful but when I try to use the package I get the following error julia\> using MATLAB \[ Info: Precompiling MATLAB \[10e44e05-a98a-55b3…

---

## [Reading 12 bit integers from file](https://discourse.julialang.org/t/reading-12-bit-integers-from-file/60173)

<div class="topic-metadata">

**Author:** [@Shawly](https://discourse.julialang.org/u/Shawly)\
**Replies:** 4\
**Last updated:** [April 28, 2021, 3:42pm UTC](https://discourse.julialang.org/t/reading-12-bit-integers-from-file/60173 "2021-04-28T15:42:20Z")

</div>

I am new to Julia and trying to port some code from Matlab. I have an image file saved as a raw binary file with 12 bit precision. In Matlab I can use fread (Read data from binary file - MATLAB fread - MathWorks United K…

---

## [Calling Julia from MATLAB](https://discourse.julialang.org/t/calling-julia-from-matlab/51542)

<div class="topic-metadata">

**Author:** [@Vangelis](https://discourse.julialang.org/u/Vangelis)\
**Replies:** 19\
**Last updated:** [April 4, 2021, 1:30am UTC](https://discourse.julialang.org/t/calling-julia-from-matlab/51542 "2021-04-04T01:30:28Z")

</div>

Hello everyone, I am trying to call a Julia algorithm from MATLAB. Looking at https://github.com/juliamatlab/ I found the: mexjulia jlcall I tried both and, after making some corrections (because are meant for Julia…

---

## [Julia slower than Matlab & Python? No](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 119\
**Last updated:** [March 16, 2021, 1:00am UTC](https://discourse.julialang.org/t/julia-slower-than-matlab-python-no/33128 "2021-03-16T01:00:51Z")

</div>

A recent paper ML Software & Hardware for Econ finds Julia is often slower than Matlab & Numpy. Code for Option Pricing is here. Code for Dynamic Programming is here. Usually, writing Julia code similarly leads to eno…

---

## [How to assign Matrix with dimensions (1,1) to a scalar](https://discourse.julialang.org/t/how-to-assign-matrix-with-dimensions-1-1-to-a-scalar/56808)

<div class="topic-metadata">

**Author:** [@tqml](https://discourse.julialang.org/u/tqml)\
**Replies:** 9\
**Last updated:** [March 9, 2021, 3:38pm UTC](https://discourse.julialang.org/t/how-to-assign-matrix-with-dimensions-1-1-to-a-scalar/56808 "2021-03-09T15:38:01Z")

</div>

Hello I’m quite new to Julia and coming from MATLAB and Python and I have some trouble with operations that should be quite common but I haven’t found any workaround/solution in the usual places (Manual, Github and here)…

---

## [Accessing Matlab-function from Julia](https://discourse.julialang.org/t/accessing-matlab-function-from-julia/54221)

<div class="topic-metadata">

**Author:** [@andre96](https://discourse.julialang.org/u/andre96)\
**Replies:** 1\
**Last updated:** [January 29, 2021, 9:29pm UTC](https://discourse.julialang.org/t/accessing-matlab-function-from-julia/54221 "2021-01-29T21:29:37Z")

</div>

Hello everyone, I recently started to work with Julia and need to evaluate some custom matlab-functions in my julia-scripts. Therefore, I added the package MATLAB.jl and updated the environment variable MATLAB\_HOME to t…

---

## [Help converting a transformation matrix](https://discourse.julialang.org/t/help-converting-a-transformation-matrix/46095)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 5\
**Last updated:** [September 11, 2020, 11:48am UTC](https://discourse.julialang.org/t/help-converting-a-transformation-matrix/46095 "2020-09-11T11:48:31Z")

</div>

For lack of a better alternative, I’m using Matlab’s image calibration toolbox. One of the things I’m after is the transformation matrix Matlab’s fitgeotrans outputs: tform = fitgeotrans(imagePoints, worldPoints, 'proje…

---

## [MethodError: Cannot \`convert\` an object of type Array{Float64,1} to an object of type Float64](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-array-float64-1-to-an-object-of-type-float64/42527)

<div class="topic-metadata">

**Author:** [@hafez\_ahmad](https://discourse.julialang.org/u/hafez_ahmad)\
**Replies:** 7\
**Last updated:** [July 4, 2020, 4:53pm UTC](https://discourse.julialang.org/t/methoderror-cannot-convert-an-object-of-type-array-float64-1-to-an-object-of-type-float64/42527 "2020-07-04T16:53:13Z")

</div>

‘’’ I am using julia 1.4.2 nx = 60 ; # try changing this number from 41 to 81 and Run All ... what happens? dx = 2/(nx-1); nt = 25 ; #nt is the number of timesteps we want to calculate dt = .025 ; #dt is the amount o…

---

## [Julia for prototyping, compared to MATLAB?](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900)

<div class="topic-metadata">

**Author:** [@ElectronicTeaCup](https://discourse.julialang.org/u/ElectronicTeaCup)\
**Replies:** 70\
**Last updated:** [May 28, 2020, 5:03am UTC](https://discourse.julialang.org/t/julia-for-prototyping-compared-to-matlab/33900 "2020-05-28T05:03:47Z")

</div>

I was talking to a colleague, and they were basically telling me how they would not want to use Julia because most of their time is actually spent on trying different analyses, and exploring data. And for that MATLAB is …

---

## [Getting a list of file names](https://discourse.julialang.org/t/getting-a-list-of-file-names/39492)

<div class="topic-metadata">

**Author:** [@eslb82](https://discourse.julialang.org/u/eslb82)\
**Replies:** 4\
**Last updated:** [May 15, 2020, 11:26am UTC](https://discourse.julialang.org/t/getting-a-list-of-file-names/39492 "2020-05-15T11:26:28Z")

</div>

I’ve been asked to convert some code from Matlab to Julia, and I am stuck right at the beginning with some Regex issues I want the equivalent of file\_name = dir(‘A\*.mmode’) file\_name = {file\_name.name} In Matlab, thi…

[Previous page](https://discourse.julialang.org/tag/matlab/89.md?match_all_tags=true&page=1&tags%5B%5D=matlab)

[Next page](https://discourse.julialang.org/tag/matlab/89.md?match_all_tags=true&page=3&tags%5B%5D=matlab)
