Effacer les filtres
Effacer les filtres

How can I manipulate the 2D data to make it smoother

39 vues (au cours des 30 derniers jours)
Luqman Saleem
Luqman Saleem le 7 Juil 2024 à 11:54
Réponse apportée : Umar le 8 Juil 2024 à 3:27
I have the following data represented by the surface plot:
clear; clc;
load('data.mat')
figure;
surf(nXX,nYY,nZZ,'linestyle','none','facecolor','interp')
hold on
plot3([0, 0.5], [0, 0.145], [2, 2],'Color','white','LineStyle','--','LineWidth',2);
plot3([0, 0.5], [2*0.145, 0.145], [2, 2],'Color','black','LineStyle','--','LineWidth',2);
annotation('ellipse',[0.08 0.58 0.18 0.34],'LineWidth',2);
xlabel('C_a')
ylabel('C_d')
zlabel('C_z')
view(2)
colorbar
set(gca,'FontSize',13)
I want to remove the blue part inside the ellipse and extend the yellow area smoothly till C_a=0 and above the black dashed line. Although the yellow region appears constant, it actually changes very slowly. I aim to extend this yellow part while preserving its gradual variation.

Réponses (1)

Umar
Umar le 8 Juil 2024 à 3:27

Hi Luqman,

To achieve your desired modification in the surface plot, you can manipulate the data points within the region of interest to extend the yellow area smoothly till C_a=0 and above the black dashed line while maintaining its gradual variation. Here's a step-by-step guide on how you can proceed:

1. Identify the data points corresponding to the blue part inside the ellipse that you want to remove. You can do this by analyzing the values of nXX, nYY, and nZZ within that region.

2. Once you have identified the data points to be removed, replace them with values that seamlessly extend the yellow area towards C_a=0 and above the black dashed line. Ensure that these new values reflect the gradual variation you aim to preserve.

3. After updating the relevant data points, replot the modified surface plot using surf(nXX, nYY, nZZ) to visualize the changes. You should observe a smooth extension of the yellow area as desired.

 4. If necessary, adjust the data points further to fine-tune the extension of the yellow region while maintaining its slow variation.  

By following these steps and carefully manipulating the data points within the specified region, you should be able to achieve your goal of extending the yellow area smoothly while preserving its gradual variation in the surface plot. Feel free to experiment with different data adjustments to achieve the desired visual effect accurately.

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by