How do I use a formula out of a cellarray in a for-loop?
Show older comments
Hi Community,
In measurement evaluation it is necassary to analyze uncertainties (e).
Time = Data(:,1);
Temperatur = Data(:,2);
In my Gui it should be possible to choose an e_i from an array:
Formula1 = 'a*Temperatur+b';
Formula2 = 'a*Temperatur+2b'; % and so on
DefaultAccuracy = {Formula1; Formular2...};
A popupmenu gives a value k that stands for the Input Accuracy:
InputAccuracy = DefaultAccuracy {1, k};
If I use e = a*Temperatur+b the errorbar order works:
errorbar(Time, Temperatur, e)
In the next step e should be variable:
MeasurementLength = lenght(Data);
How do I have to develop a for-loop to get e by choosing the formula with the popupmenu
for i = 1:MeasurementLength
e{i} = InputAccuracy{Temperatur{i}}
end
Please excuse my bad english and thanks for helping me! Christian
Accepted Answer
More Answers (0)
Categories
Find more on App Building 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!