Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ By default, `MATLAB.jl` uses the MATLAB installation with the greatest version n

### Windows

1. Start a Command Prompt as an Administrator.
1. Start a Command Prompt as an Administrator and enter `matlab /regserver`.

2. Enter `matlab /regserver` in the command prompt.

3. From Julia run: `Pkg.add("MATLAB")`
2. From Julia run: `Pkg.add("MATLAB")`


### Linux
Expand Down
7 changes: 2 additions & 5 deletions src/mxarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ typealias MxNum Union{MxRealNum, MxComplexNum}

typealias mwSize UInt
typealias mwIndex Int
typealias mxChar UInt16
typealias mxClassID Cint
typealias mxComplexity Cint

Expand Down Expand Up @@ -639,11 +640,7 @@ function jstring(mx::MxArray)
if !(classid(mx) == mxCHAR_CLASS && ((ndims(mx) == 2 && nrows(mx) == 1) || is_empty(mx)))
throw(ArgumentError("jstring only applies to strings (i.e. char vectors)."))
end
len = ncols(mx) + 1
tmp = Array(UInt8, len)
ccall(_mx_get_string, Cint, (Ptr{Void}, Ptr{UInt8}, mwSize), mx, tmp, len)
pop!(tmp)
String(tmp)
return transcode(String, unsafe_wrap(Array, Ptr{mxChar}(data_ptr(mx)), ncols(mx)))
end

function jdict(mx::MxArray)
Expand Down