Skip to content
Advertisement

Tag: matlab

I rewrite a matlab code in python but they result different outputs

the matlab code and the output i was expecting (gauss elimination method) my code in python: the output i got: Answer Your problem is related to casting. Without info, numpy cast your matrix to integer numbers, so when you divide, the result is not a float. For example 2 / 6 = 0 and not 0.33333. If you put your

how to build app container in Python or Matlab

I have just started learning Python. I would like to build an application with bar menus and different windows contained inside what I think coders call a ‘boiler plate’ a window containing everything. The app has to contain also pull-down menus with file handling, settings, functions .. some are repeated inside windows contained in the boiler plate. The app would

What is the matplotlib equivalent of MATLAB Figure.Position?

I am working on converting some MATLAB plotting code to Python / matplotlib. The original MATLAB code contains this: I am trying to determine the matplotlib equivalent of the assignment to F.Position. MATLAB docs describe this property as conveying the location and size of the drawable area, but matplotlib.figure.Figure does not appear to have a corresponding property. matplotlib.axes.Axes does seem

MATLAB Engine API for Python. Error: MATLAB Engine for Python supports Python version

I’m working on my Master’s Thesis. My director uses MATLAB, I use Python. So I need to run his MATLAB scripts on Python. There are many questions out there on this topic. I tried to install Install MATLAB Engine API for Python (https://es.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html). I came across the following problem: Error: MATLAB Engine for Python supports Python version 2.7, 3.7, 3.8,

Vectorizing Tensor Products from Python to Matlab

I am in the process of converting some code from Python into Matlab. I have code working that produces the same results, but I am wondering if there may be a way to vectorize some of my for loops in the Matlab code as it take a long time to run. X in an Nxd matrix, diff is an NxNxd

MATLAB freqz2 equivalent in Python

I’m trying to find a Python library that works equivalently to MATLAB’s freqz2 for image processing, since scipy.signal.freqz only seems to work for 1-D arrays. Answer Found an amazing library for plotting the 3D surface of the 2-D FFT called plotly. I leave here the lines of code I used to emulate the same behaviour of freqz2 in Python: The

Advertisement