Warning: Imaginary parts of complex X and/or Y arguments ignored.
5 次查看(过去 30 天)
显示 更早的评论
I keep getting this error messgae when plotting some quantaties. My code points out that U_T is a cmplex double which is not true. So, I am not sure what is the problem, I know it happens in Line and in function C2P but I do not see how
gamma = 1.4;
sigmma = 1.0;
CFL = 0.1;
tend = 0.125;
N_max = 10000;
dx = 0.001;
L = 1;
x = 0:dx:L;
N = length(x);
rho1 = 1.0;
p1 = 1.0;
u1 = 0.0;
v1 = 0.0;
w1 = 0.0;
Bx1 = 0.0;
By1 = 0.0;
Bz1 = 0.0;
rho5 = 0.125;
p5 = 0.1;
u5 = 0.0;
v5 = 0.0;
w5 = 0.0;
Bx5 = 0.0;
By5 = 0.0;
Bz5 = 0.0;
VL = [rho1; u1; v1; w1; p1; Bx1; By1; Bz1];
VR = [rho5; u5; v5; w5; p5; Bx5; By5; Bz5];
I will attach my functions in case you wanna give it a run. But can someone help me understand the problem better. Thanks
2 个评论
the cyclist
2021-4-27
I did try to run your code, but it errored at the line
[U_T, t] = MacCormack(U_T, gamma, t, dx, CFL, sigmma); % error here
Unrecognized function or variable 'MacCormack'
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!