Save and rename part of files in plot
Show older comments
Hi,
I have a plot3 with 38 files in red and 12 files in blue. Now I want to select 12 files from red in the plot and rename those to simular names as the blue files.
I have no idea where to start and if this will be possible.
So I need to add a 'click function' and after the click another click or add name function how to save it.
Thanks in advance.
%open files blue
for k = 1:length(f);
filename = fullfile(f(k).folder, f(k).name);
CSVData = readmatrix(filename, 'Range', 1, 'Delimiter', ','); [filepath,name,ext] = fileparts(filename); indexCSV = [(0:size(CSVData,1)-1)' CSVData];
xC{k,1}=CSVData(:,7); yC{k,1}=CSVData(:,8); zC{k,1}=CSVData(:,9); radC{k,1}=CSVData(:,2)/2;
indexC =indexCSV(:,1);
end
%open files red
for i = 1:numbcenterlines
Ofilename = 'vessel_'+string(i)+'.csv';
DataText = readmatrix(Ofilename, 'Range', 1, 'Delimiter', ','); b = [(0:size(DataText,1)-1)' DataText];
index =b(:,1);
x =DataText(:,1); y =DataText(:,2); z =DataText(:,3);
for k = 1:length(f)
plot3(xC{k,1},yC{k,1}, zC{k,1},'-b')
hold on
end
plot3(x,y,z, '-r');
hold on
end
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!