Why am I getting: "invalid syntax at "(" .A might be missing a closing ")"
Show older comments
What is messing here??
source = ((-4*A^2*alpha)-(9*B^2*alpha))*(cos^2( (2*A) * XX).* sin^2( (3*B) * YY))...
-( (5/2)*4*A^2*alpha+(5/2)*9*B^2*alpha)*(cos( (2*A) * XX).* sin( (3*B) * YY))...
+ ((4*A^2*alpha)*(sin^2((2*A) * XX).* sin^2( (3*B) * YY)))...
+ ((9*B^2*alpha)*(cos^2((2*A) * XX).* cos^2( (3*B) * YY))));
Error at first line where the cosine squared is
(cos^2( .. %underneath the paranthesis infront of cos^2
I don't understand???
2 Comments
The functions COS and SIN require an input argument, so many of your function calls are invalid:
cos^2(..) % invalid sytanx (COS has no input)
cos(..)^2 % valid syntax
I suspect that you actually want POWER .^ and not MPOWER ^
Jamie Al
on 8 Oct 2021
Accepted Answer
More Answers (1)
KSSV
on 8 Oct 2021
You are missing an operator, multiplication operator at many places.
(cos^2*( .. %underneath
Categories
Find more on Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!