matlab

how to build app container in Python or Matlab

how to build app container in Python or Matlab Question: 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, …

Total answers: 1

How to use numpy in matrices iterations like Matlab

How to use numpy in matrices iterations like Matlab Question: I am used to make my discrete time control systems simulations in Matlab and now I’m trying python and numpy. So, my code bellow is working, but I would like to iterate over the numpy vector instead appending values into a list. Is it possible? …

Total answers: 2

Replicating MATLAB's `randperm` in NumPy

Replicating MATLAB's `randperm` in NumPy Question: I want to replicate MATLAB’s randperm() with NumPy. Currently, to get randperm(n, k) I use np.random.permutation(n)[:k]. The problem is it allocates an array of size n then takes only k entries of it. Is there a more memory efficient way to directly create the array? Asked By: Royi || …

Total answers: 3

Why different results for Euler to Rotation Matrix in Matlab and Python

Why different results for Euler to Rotation Matrix in Matlab and Python Question: When I use Matlab and Python to transform from Euler to Rotation Matrix, I get different results, and I can’t figure out why. Python code from scipy.spatial.transform import Rotation as R cam_angle = 45 R.from_euler(‘xyz’, [-90-cam_angle, 0, -90], degrees=True).as_matrix() gives: array([[ 0. …

Total answers: 1

How to detect if a data frame has nan values in MATLAB?

How to detect if a data frame has nan values in MATLAB? Question: I am new to Matlab and Python. Currently I am working on some assignment where I want to check if data frame has nan values in matlab or not? Asked By: Ramen || Source Answers: In python with pandas you can use …

Total answers: 1

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

MATLAB Engine API for Python. Error: MATLAB Engine for Python supports Python version Question: 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 …

Total answers: 2

MATLAB freqz2 equivalent in Python

MATLAB freqz2 equivalent in Python Question: 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. Asked By: Facundo Farall || Source Answers: Found an amazing library for plotting the 3D surface of the 2-D FFT called plotly. I leave …

Total answers: 2

Python/Numpy equivalent of MATLAB isosurface functions

Python/Numpy equivalent of MATLAB isosurface functions Question: Anyone can suggest the equivalent function of MATLAB’s "isosurface" function in python/numpy. The MATLAB isosurface returns the faces and vertices. I need the faces and vertices to create .stl files. MATLAB isosurface function looks like this: [f,v] = isosurface(X,Y,Z,V,isovalue) in python I have found this one method in …

Total answers: 2

Is there a function in Python similar to Matlab's deconvblind?

Is there a function in Python similar to Matlab's deconvblind? Question: I’m working on blind deconvoltuion. In iterating L2norm reguralization, I want to update the PSF at the same time, and when I looked it up, I found a function called deconvblind in Matlab: l[J,PSF] = deconvblind(I,INITPSF) deconvolves image I using the maximum likelihood algorithm, …

Total answers: 2