Error using sscanf Invalid format.
Afficher commentaires plus anciens
this is my code and i am gettin the above mentioned error help would be apreciated
% Button pushed function: SelectFileButton
function SelectFileButtonPushed(app, event)
[F,P] = uigetfile();
Results1 = fullfile(P,F);
Results2 = fopen(Results1);
Results4 = [0,0,0];
FlowRatePulse = [];
Pressure = [];
n = 0;
Time = 0;
while n >= 0
n = n+1;
Results3 = fgetl(Results2);
Results5 = sscanf(Results3,Results4);
Pressure(n) =((-0.2+Results5(1,1))/0.0018)/5;
FlowRatePulse(n) = Results5(1,2)/330;
Time = Time + Results5(1,3);
end
plot(app.UIAxes,Pressure,FlowRatePulse,'o')
plot(app.UIAxes2,Time,Pressure,'o')
plot(app.UIAxes3,Time,FlowRatePulse,'o')
end
2 commentaires
Stephen23
le 5 Juin 2020
I note that you have already fixed your previous unrelated error using the answer that I gave you, but have not accepted the answer. On this forum it is considered polite to accept an answer when it resolves your original question.
Jordan Stocker
le 5 Juin 2020
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur App Building dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!