how to plot contour ?
Ältere Kommentare anzeigen
How to do the below mentioned process in the loop and save contour. Please share your knowledge. Attached data for your reference.
I tried to create a loop but got the Error: Invalid array indexing. T = readtable('HB2B_2530.csv','PreserveVariableNames',true); Vx = table2array(T(:,:));%X TTT = Vx(:,10:13); A=unique(TTT,'rows'); Acell=splitapply(@(x){x}, A,findgroups(A(:,2))); Acell{:}; y1 = [Acell{1,:}];%first plane values y2 = [Acell{2,:}];%second plane values y3 = [Acell{3,:}];%third plane values y4 = [Acell{4,:}];%fourth plane values for i= 1:4 rg(i) = linspace(min(y(i)(:,1)), max(y(i)(:,1)), 100); cg(i) = linspace(min(y(i)(:,3)), max(y(i)(:,3)), 100); [Rg(i), Cg(i)] = meshgrid(rg(i), cg(i)); Zg(i) = griddata(y(i)(:,1), y(i)(:,3), y(i)(:,4), Rg(i), Cg(i)); contourf(Rg(i),Cg(i),Zg(i)); end
2 Kommentare
Walter Roberson
am 16 Dez. 2022
I am not sure what you mean by "save contour in auto" ?
Acell{:};
What is the purpose of that line?
Is there a reason you are using readtable() followed by table2array() instead of using readmatrix() ?
MS
am 16 Dez. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

