Borrar filtros
Borrar filtros

How should I use erfc?

2 visualizaciones (últimos 30 días)
인범 황
인범 황 el 4 de Oct. de 2021
Respondida: Walter Roberson el 4 de Oct. de 2021
The equation in the photo is the analytic solution of the ED model(equilibrium-dispersive model).
We want to express the expression of the photo in MATLAB.
Shouldn't variables be used in erfc?
Please tell me how to use erfc
The variables are x and t.
c(x,t)
Please tell me how to put it in matlab.
  1 comentario
Rik
Rik el 4 de Oct. de 2021
What did you try so far?
Have a read here and here. It will greatly improve your chances of getting an answer.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Oct. de 2021
When you use simulink, generally speaking each time you call a function other than the basic mathematical operators, you should assign the result to a variable. The variable should have already been assigned zeros() that is the same size as the result you expect from the function call.
t1 = zeros(1,1);
t2 = zeros(1,1);
t3a = zeros(1,1);
t3b = zeros(1,1);
t4 = zeros(1,1);
t5a = zeros(1,1);
t5b = zeros(1,1);
t1 = sqrt(P_e/2);
t2 = L./u .* (1 + a.*F);
t3a = t2 .* x - t;
t3b = t2 .* x + t;
t4 = sqrt(t2 .* t);
t5a = erfc(t1 .* t3a ./ t4);
t5b = erfc(t1 .* t3b ./ t4);
and so on.
Not all of the above temporary variables are required: some of them exist only to make it easier to write both erfc() sub-expressions

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by