Linkdata using indexed data doesn't work
Show older comments
Hello,
I'm plotting data from multiple files. The number of files is chosen by the user, so I don't know the number ahead of time. The variables that I'm trynig to plot are mxn dimension, where m is the number of files and n is the size of the variable in each file (e.g., time goes from 1:20 seconds in each file, if the user uploads 3 files, time is a 3x20 matrix. All the variables (time, powerFor, powerRef, powerDel) are defined in the workspace and sent to the function, as shown in the code below below. If the user chooses to upload more than 1 file, the linkdata doesn't work, since I guess it can't identify the data source unambigously. Is there a quick work around for this without having to change the enitre logic of the file upload such that it doesn't use matrices to store the data?
function CodeSnippet (time, powerFor, powerRef, powerDel)
for i = 1:numFiles
hold on
plot(time(i, :), powerFor(i, :),'LineWidth', 2); linkdata on;
plot(time(i, :), powerRef(i, :),'LineWidth', 2); linkdata on;
plot(time(i, :), powerDel(i, :),'LineWidth', 2); linkdata on;
end
end
Thanks
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!