Answered

How is data passed from MATLAB to python?

All of the data conversions given in the following page of the documentation are passed by value (ie. data is copied from the MA...

How is data passed from MATLAB to python?

All of the data conversions given in the following page of the documentation are passed by value (ie. data is copied from the MA...

meer dan 2 jaar ago | 0

| accepted

Answered

Save Python List to MAT File (R2015b)

"Saving (serializing) Python objects into a MAT-file" is listed as a limitation in the documentation [1]. # <https://www.math...

Save Python List to MAT File (R2015b)

"Saving (serializing) Python objects into a MAT-file" is listed as a limitation in the documentation [1]. # <https://www.math...

meer dan 2 jaar ago | 0

Answered

Matlab-python interface broken ?

When python is running within MATLAB, it ends up using MATLAB's MKL. It looks like your Python code is incompatible with MATLAB'...

Matlab-python interface broken ?

When python is running within MATLAB, it ends up using MATLAB's MKL. It looks like your Python code is incompatible with MATLAB'...

meer dan 2 jaar ago | 3

Answered

Calling custom Python (.py) files will not update with new file saves

You need to reload the module after you change and re-save the .py file. The documentation describes the workflow for making the...

Calling custom Python (.py) files will not update with new file saves

You need to reload the module after you change and re-save the .py file. The documentation describes the workflow for making the...

meer dan 2 jaar ago | 0

Answered

why does Matlab return ' expression to the left of the equals sign is not a valid target'

MATLAB doesn't support keyword arguments [1]. To pass keyword argument to Python, use pyargs [2]. Example: N = py.oanda...

why does Matlab return ' expression to the left of the equals sign is not a valid target'

MATLAB doesn't support keyword arguments [1]. To pass keyword argument to Python, use pyargs [2]. Example: N = py.oanda...

meer dan 2 jaar ago | 2

Answered

How do I call a custom python function from matlab that uses an import statement?

Based on the error message, "TypeError: 'float' object cannot be interpreted as an index" you are passing a double when you shou...

How do I call a custom python function from matlab that uses an import statement?

Based on the error message, "TypeError: 'float' object cannot be interpreted as an index" you are passing a double when you shou...

bijna 3 jaar ago | 3

Answered

Pubmed API: What are systemID and publicID?

It is possible to avoid XML by using |webread| and setting the |retmode| parameter to |'json'|. JSON is easier to work with beca...

Pubmed API: What are systemID and publicID?

It is possible to avoid XML by using |webread| and setting the |retmode| parameter to |'json'|. JSON is easier to work with beca...

bijna 3 jaar ago | 0

Answered

MCR Applications with Python Functions

You could try the workaround suggested <https://www.mathworks.com/support/bugreports/details/1325030?partial=collapsed here> .

MCR Applications with Python Functions

You could try the workaround suggested <https://www.mathworks.com/support/bugreports/details/1325030?partial=collapsed here> .

bijna 3 jaar ago | 0

| accepted

Answered

Why are my graphs closing when I use the matlab api?

My guess is that MATLAB is exiting when your script finishes. Since you are starting a new MATLAB session, the lifetime of MATLA...

Why are my graphs closing when I use the matlab api?

My guess is that MATLAB is exiting when your script finishes. Since you are starting a new MATLAB session, the lifetime of MATLA...

bijna 3 jaar ago | 0

Answered

How to have matlab engine return value of variable in python

1) Use eng.workspace['VariableName']. See <https://www.mathworks.com/help/matlab/matlab_external/use-the-matlab-engine-workspace...

How to have matlab engine return value of variable in python

1) Use eng.workspace['VariableName']. See <https://www.mathworks.com/help/matlab/matlab_external/use-the-matlab-engine-workspace...

bijna 3 jaar ago | 0

Answered

I'm using the Matlab API for Python because I want to use the robotics toolbox.

Based on the complaint about integers in the error message, I'm guessing that you need to make everything floats (add decimal po...

I'm using the Matlab API for Python because I want to use the robotics toolbox.

Based on the complaint about integers in the error message, I'm guessing that you need to make everything floats (add decimal po...

ongeveer 3 jaar ago | 0

Answered

Segmentation violation Mac on startup

It looks like you hit this <https://www.mathworks.com/support/bugreports/search_results?utf8=%25E2%259C%2593&search_executed=1&k...

Segmentation violation Mac on startup

It looks like you hit this <https://www.mathworks.com/support/bugreports/search_results?utf8=%25E2%259C%2593&search_executed=1&k...

ongeveer 3 jaar ago | 2

| accepted

Answered

Calling python module from matlab causes segmentation fault in h5py

Could you rebuild h5py with hdf5 version 1.8.12?

Calling python module from matlab causes segmentation fault in h5py

Could you rebuild h5py with hdf5 version 1.8.12?

ongeveer 3 jaar ago | 1

Answered

Pythons unpack_From in Matlab

The function typecast [1] might do what you want. I'm going to give an example of how to use it but I need to make a few assumpt...

Pythons unpack_From in Matlab

The function typecast [1] might do what you want. I'm going to give an example of how to use it but I need to make a few assumpt...

ongeveer 3 jaar ago | 1

| accepted

Solved

letter yes yes & letter no no

Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

meer dan 3 jaar ago

Solved

Reverse the Words (not letters) of a String

*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

meer dan 3 jaar ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

meer dan 3 jaar ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

meer dan 3 jaar ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

meer dan 3 jaar ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

meer dan 3 jaar ago

Solved

Calculate the derivative of a polynomial

Example: in = [ 1 1 1 ] out = [ 2 1 ]

meer dan 3 jaar ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

meer dan 3 jaar ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

meer dan 3 jaar ago

Solved

High school cafeteria

Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

meer dan 3 jaar ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

meer dan 3 jaar ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

meer dan 3 jaar ago

Answered

How to use RPC protocol (Remote Procedure Call) to send a HTTP request as formatted JSON to a web server?

The documentation for webread says that it only supports application/x-www-form-urlencoded for HTTP POST requests [1]. Since you...

How to use RPC protocol (Remote Procedure Call) to send a HTTP request as formatted JSON to a web server?

The documentation for webread says that it only supports application/x-www-form-urlencoded for HTTP POST requests [1]. Since you...

meer dan 3 jaar ago | 0

| accepted

Answered

Is it possible to import and use third party matlab functions/packages in python?

It looks like your problem is with import. I don't think the import that executes in your script, |load_javaplex|, is available ...

Is it possible to import and use third party matlab functions/packages in python?

It looks like your problem is with import. I don't think the import that executes in your script, |load_javaplex|, is available ...

meer dan 3 jaar ago | 1

| accepted

Answered

problems with code call from python

The error message says, "array of MATLAB int64 type cannot be returned..." One way to fix this is to return a double array from ...

problems with code call from python

The error message says, "array of MATLAB int64 type cannot be returned..." One way to fix this is to return a double array from ...

meer dan 3 jaar ago | 0

| accepted