1
$\begingroup$

I'm trying to develop some code that I can easily adapt to different material models (see Propagation Models
For that I have defined a "vector"
enter image description here
that enters into the functions that are the starting point of all the procedure:
enter image description here
Or if you like it better

Subscript[\[Rho], JCA][\[Omega]_, \[Sigma]_, \[Phi]_, ainf_, \[CapitalLambda]VCL_] := ((ainf*\[Rho])/\[Phi])*(1 + ((\[Sigma]*\[Phi])/(I*\[Omega]*ainf*\[Rho]))*Sqrt[1 + I*((4*ainf^2*\[Eta]*\[Rho]*\[Omega])/(\[Sigma]^2*\[CapitalLambda]VCL^2*\[Phi]^2))]); 

Subscript[K, JCA][[Omega], [Phi], [CapitalLambda]TCL_] := ([Gamma]Subscript[p, 0])/[Phi]/([Gamma] - ([Gamma] - 1)/(1 - I((8*[Kappa])/([CapitalLambda]TCL^2Cp[Rho][Omega]))Sqrt[1 + I(([CapitalLambda]TCL^2Cp*[Rho][Omega])/(16[Kappa]))]));

Subscript[k, w][\[Omega]_, \[Sigma]_, \[Phi]_, 

ainf_, [CapitalLambda]VCL_, [CapitalLambda]TCL_] := [Omega]* Sqrt[Subscript[[Rho], JCA][[Omega], [Sigma], [Phi], ainf, [CapitalLambda]VCL]/ Subscript[K, JCA][[Omega], [Phi], [CapitalLambda]TCL]]; Subscript[Z, w][[Omega], [Sigma], [Phi], ainf, [CapitalLambda]VCL_, [CapitalLambda]TCL_] := Sqrt[Subscript[[Rho], JCA][[Omega], [Sigma], [Phi], ainf, [CapitalLambda]VCL]* Subscript[K, JCA][[Omega], [Phi], [CapitalLambda]TCL]];

Everything calculates well. E.g.:
enter image description here
I defined first
enter image description here
I tried then to get a fit:
enter image description here
The error message is something I don't understand:
enter image description here
I tried all possible combinations with error messages always different, but always useless.
Please help!
Excuse me if I have used images. If I had used the inline notation, you would have understood nothing.
Thanks

$\endgroup$
8
  • 5
    $\begingroup$ Please post the code as text form. $\endgroup$ Commented Aug 11 at 12:41
  • 4
    $\begingroup$ You are much more likely to get a helpful answer if you copy and paste your input code. $\endgroup$ Commented Aug 11 at 13:24
  • 1
    $\begingroup$ Convert your cells to InputForm prior to copy and paste. $\endgroup$ Commented Aug 11 at 15:56
  • $\begingroup$ There are undefined variables in your function definitions (e.g., \[Rho], \[Eta], \[Gamma], p0, Cp, \[Kappa]) $\endgroup$ Commented Aug 11 at 17:37
  • 1
    $\begingroup$ Your code should be self-contained and minimally complete to enable us to execute. $\endgroup$ Commented Aug 12 at 0:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.