Skip to content

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 yo…

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 …

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 emulat…