Skip to main content
deleted 9 characters in body
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

Is there a way to improve this fitting?

    dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0.093188}, {170, 0.0886728}, {180, 0.0871093}, {190, 
  0.0886728}, {200, 0.093188}, {210, 0.100168}, {220, 0.108915}, {230,
   0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 0.147198}, {270,
   0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 0.172141}, {310,
   0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 0.182312}, {350,
   0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Is there a way to improve this fitting?

    dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0.093188}, {170, 0.0886728}, {180, 0.0871093}, {190, 
  0.0886728}, {200, 0.093188}, {210, 0.100168}, {220, 0.108915}, {230,
   0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 0.147198}, {270,
   0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 0.172141}, {310,
   0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 0.182312}, {350,
   0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Is there a way to improve this fitting?

    dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0.093188}, {170, 0.0886728}, {180, 0.0871093}, {190, 
  0.0886728}, {200, 0.093188}, {210, 0.100168}, {220, 0.108915}, {230,
   0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 0.147198}, {270,
   0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 0.172141}, {310,
   0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 0.182312}, {350,
   0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {( A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], (( A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Became Hot Network Question
added 50 characters in body
Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

Is there a way to improve this fitting?

    dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0.093188}, {170, 0.0886728}, {180, 0.0871093}, {190, 
  0.0886728}, {200, 0.093188}, {210, 0.100168}, {220, 
  0.108915}, {230,
   0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 
  0.147198}, {270,
   0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 
  0.172141}, {310,
   0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 
  0.182312}, {350,
   0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Is there a way to improve this fitting?

dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0}, {170, 0}, {180, 0}, {190, 0}, {200, 0}, {210, 0.100168}, {220, 
  0.108915}, {230, 0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 
  0.147198}, {270, 0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 
  0.172141}, {310, 0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 
  0.182312}, {350, 0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Is there a way to improve this fitting?

    dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0.093188}, {170, 0.0886728}, {180, 0.0871093}, {190, 
  0.0886728}, {200, 0.093188}, {210, 0.100168}, {220, 0.108915}, {230,
   0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 0.147198}, {270,
   0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 0.172141}, {310,
   0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 0.182312}, {350,
   0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here

Source Link
MMA13
  • 5.7k
  • 3
  • 17
  • 30

How to improve nonlinear fitting

Is there a way to improve this fitting?

dat={{0, 0.183453}, {10, 0.18317}, {20, 0.182312}, {30, 0.180844}, {40, 
  0.178713}, {50, 0.175843}, {60, 0.172141}, {70, 0.167506}, {80, 
  0.161841}, {90, 0.155074}, {100, 0.147198}, {110, 0.138308}, {120, 
  0.128652}, {130, 0.118654}, {140, 0.108915}, {150, 0.100168}, {160, 
  0}, {170, 0}, {180, 0}, {190, 0}, {200, 0}, {210, 0.100168}, {220, 
  0.108915}, {230, 0.118654}, {240, 0.128652}, {250, 0.138308}, {260, 
  0.147198}, {270, 0.155074}, {280, 0.161841}, {290, 0.167506}, {300, 
  0.172141}, {310, 0.175843}, {320, 0.178713}, {330, 0.180844}, {340, 
  0.182312}, {350, 0.18317}, {360, 0.183453}};
Block[{\[Theta] = 40},
 fit = NonlinearModelFit[
   dat, {(a A Cos[\[Theta] Degree] + 
      B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] Degree]),
     A > 0, B > 0 },
   {{A, 0}, {B, 0}, {a, 0}}, \[Phi]]; 
 ListLinePlot[{Table[{\[Phi], ((a A Cos[\[Theta] Degree] + 
         B Sin[\[Theta] Degree] Cos[\[Theta] Degree] Cos[\[Phi] \
Degree])) /. fit["BestFitParameters"]}, {\[Phi], 0, 360, 10}], dat}, 
  PlotStyle -> {Gray, Red}, PlotLegends -> {"fit", "dat"}]]    

enter image description here