Insert Interpolation Into Matlab Code
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
KIEN WEI LAI
il 22 Nov 2019
Commentato: KIEN WEI LAI
il 25 Nov 2019
Hi, I am new to Matlab programming. The graph result should be have a range of x-asix from -1 to 1, but now the graph is from 0 to 1. I want to set the range for x-axis from -1 to 1. May I know anyone can help me?
This is the current program code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249516/image.jpeg)
This is my current result:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/249517/image.jpeg)
Thanks in advance!
3 Commenti
Risposta accettata
the cyclist
il 22 Nov 2019
Here is my best guess at what you should do, to get what you want:
- Take the x argument out of the call to interp1
- Change the definition of interp_no_ding to be interp_no_ding = -1:1/50:1
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation 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!