Data type related debugging help

The below data (test.mat) was created inside Matlab, and the values were double inside Matlab before they were saved into the mat file. However, I’m having lots of trouble using them inside Julia:


Below is my code:

using MAT
F1 = matopen("test.mat")
x = read(F1, "x");
y = read(F1, "y");
f = read(F1, "f");
@info(type(x), type(y), type(f))

Here is the error:

**Error:** Exception while generating log record in module Main at xxx.jl:37

**│** exception =

**│** UndefVarError: type not defined

**│** Stacktrace:

**│** [1] top-level scope

**│** @ logging.jl:340

**│** [2] **include(** mod::Module, _path::String **)**

**│** @ Base ./Base.jl:386

**│** [3] **exec_options(** opts::Base.JLOptions **)**

**│** @ Base ./client.jl:285

**│** [4] **_start()**

**│** @ Base ./client.jl:485

**└** @ Main xxx.jl:37

Anyone knows what is the issue? Many thanks!

julia> type
ERROR: UndefVarError: type not defined

julia> typeof
typeof (built-in function)
1 Like

Many thanks. Now I’m able to get the below:

Info: Matrix{Float64}
typeof(y) = Matrix{Float64} (alias for Array{Float64, 2})
typeof(f) = Matrix{Float64} (alias for Array{Float64, 2})

It seems that my 1-column data is now considered a two column array within Julia? How should I fix this issue? Each of my x, y, and f should be one-column 'double" data.