Advertisement
hughmiki

Untitled

Mar 24th, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. %% Micromanometer velocity computations
  2. level = [3.39,3.5,4.15,5.1,5.48]*1e-1;
  3. deltaHmano = level -level(1)
  4. deltPmano = 2*998*981*2.54/100*deltaHmano
  5. velMano = sqrt(2*deltPmano/1.19)*100/2.54/12/10
  6. %% dpt velocity comp
  7. volts = [1.5,1.72,2.18,2.88,3.21];
  8. deltaHdpt = (volts-volts(1))/4
  9. delPdpt = 998*9.81*deltaHdpt*2.54/100
  10. velDPT = sqrt(2*delPdpt/1.19)*100/2.54/12
  11. %% comparisons
  12. velWindWright = [0 15 25 35 45]
  13. fitEqn = 'm*x';
  14. fitOps = fitoptions('Method','NonlinearLeastSquares',...
  15. 'Lower',[0],...
  16. 'Upper',[inf],...
  17. 'StartPoint',[1/2]);
  18. fitType = fittype(fitEqn,'options',fitOps)
  19. [fitInfoMano,GoFMano]=fit(velWindWright',velMano',fitType)
  20. figure(9)
  21. plot(fitInfoMano,velWindWright,velMano)
  22. % manoAccuracy = (fitInfoMano*m-1/1*100)
  23. %% comparisons
  24. velWindWright = [0 15 25 35 45]
  25. fitEqn = 'm*x';
  26. fitOps = fitoptions('Method','NonlinearLeastSquares',...
  27. 'Lower',[0],...
  28. 'Upper',[inf],...
  29. 'StartPoint',[1/2]);
  30. fitType = fittype(fitEqn,'options',fitOps)
  31. [fitInfoDPT,GoFDPT]=fit(velWindWright',velDPT',fitType)
  32. figure(9)
  33. plot(fitInfoDPT,velWindWright,velDPT)
  34. % manoAccuracy = (fitInfoMano*m-1/1*100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement