how to plot contour ?
Show older comments
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 Comments
Walter Roberson
on 16 Dec 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
on 16 Dec 2022
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
