MATLAB: Error using Cos, not enough input arguments

coscos functioncosineerro not enough input argumentsfluid flowfluidsgaussian functionMATLABplasma actuator

Hello, I'm having a problem with the cosine and sine functions in MatLab. I'm trying to replicate the effect of a plasma actuator in matlab which involves adding a source term that replicates the effect. The source term involve a Guassian function;
a = (cos^2*(pi/2)/2*Ox^2) + (sin^2*(pi/2)/2*Oy^2);
b = (-(sin*2*(pi/2)/4*Ox^2 + (sin*2*(pi/2)/4*Oy^2)));
c = (sin^2*(pi/2)/2*Ox^2) + (cos^2*(pi/2)/2*Oy^2);
with the source term being;
Su = A*exp(-(a(x-xc)^2 + 2*b(x-xc)*(y-yc) + x(y-yc)^2));
when i try running, it says error using cos, not enough input arguments. Does anyone know where im going wrong?
Thanks

Best Answer

cos^2*(pi/2) % incorrect
cos(pi/2)^2 % correct
Your code has several other syntax errors, such as:
Ox % what does this mean?
Oy % what does this mean?
and
b(...) % if this is supposed to be multiplication, then you actually need:
b*(...)
You should learn basic MATLAB concepts by doing the introdcutory tutorials:
and also reading the documentation for every operation that you use, no matter how trivial you think it might be. You should also learn about vectorized code: