how to do this Python interpolation in MATLAB?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193713/image.png)
I need to convert this piece of Python code in MATLAB, but I can't seem to figure out how to do this.
T = 1968, F = 1025, used_freq = 22050, freqs = 1621 x 1 vector, log_scale_spec = 1968 x 1025 matrix, cent_spec was initialized with zeros = 1968 x 1621 matrix, and the "linspace(0, used_freq, F)" operation gives a 1025 x 1 vector
The interpolation seems to be a cubic (k = 3).
I just don't know how to structure all of this together as a for loop in MATLAB. I tried something like this so far:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/193714/image.png)
The f represents the operation " linspace(0, used_freq, F)' " Notice in Matlab, it has to be transposed with ' .
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Call Python from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!