Adding a new plot to existing figure

15 vues (au cours des 30 derniers jours)
vishakha nagarajan
vishakha nagarajan le 27 Juil 2021
I am using the curve fitting toobox to smoothen out my existing data. My original data (without smoothening) consists of 2 plots, and both of these plots have to be smoothened. But in the curve fitting toolbox i am only able to select one X and Y data to fit each time. Is there a way by which i can add another y axis so that i can fit smoothen both data values in one single graph?
Or is there another way to do it? I am attaching my orginal plot which has to be smoothened out.
  1 commentaire
Scott MacKenzie
Scott MacKenzie le 27 Juil 2021
If you just want to smooth the data for plotting, then you don't need to use the curve fitting toolbox. You can just use plot followed by hold on, then plot again with smoothed data. For smoothing, you can use built-in functions like smoothdata or interp1. If the plot gets too cluttered, you can use subplot or tiledlayout to create separate plots showing different amounts and types of smoothing.

Connectez-vous pour commenter.

Réponses (1)

Swetha Polemoni
Swetha Polemoni le 30 Juil 2021
Hi
You cannot have two y axes in fit however you can have z axis along with x and y axes to fit your data. Here is an example that you might find helpful to have the surface fit Fit a Polynomial Surface

Catégories

En savoir plus sur Curve Fitting Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by