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

4 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Umar
Umar il 8 Lug 2024

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.

Più risposte (0)

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by