set Y-Axis to descending order without changing data
Afficher commentaires plus anciens
I am calling matalb from C++ using MatlabEngine.
I have a 2D array of data absCxRes and two vectors timeShift for x-axis and frq for y-axis
arma::vec frq = arma::linspace(src1.fs() / longChunk, 0, cxResMat.n_rows);
The Y-Axis starts with 6000 and goes down to 0. However, when the image is displayed, the Y-Axis values start with 0.
std::vector<matlab::data::Array> args6({
factory.createArray({timeShift.size(), 1}, timeShift.begin(), timeShift.end()),
factory.createArray({frq.size(), 1}, frq.begin(), frq.end()),
factory.createArray({ absCxRes.n_rows, absCxRes.n_cols }, absCxRes.begin(), absCxRes.end())
});
MLPtr->eval(u"figure");
MLPtr->feval(u"pcolor", args6);
MLPtr->eval(u"shading interp");
How to change the Y-Axis numbers so that they would start with 6000 and go up to 0 without flipping the matrix.
Thanks

Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Title dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




