- #1
peripatein
- 880
- 0
Hello,
I am asked to evaluate the following expression using functions meshgrid, sum and dot operations in MATLAB:
y = Ʃ(n=1 to N) xn*[cos(x2 + n2)/xn], where x is the vector of four equally spaced values from 1 to 2, N=10.
Below is my attempt (I am quite positive it's incorrect, though):
n = 1:10;
x = linspace(1,2,4);
[X,N] = meshgrid(x,n);
y1 = (X.^N).*((cos(X.^2 + N.^2))./(X.*N));
y2 = sum(y1);
I'd appreciate your assistance!
I am asked to evaluate the following expression using functions meshgrid, sum and dot operations in MATLAB:
y = Ʃ(n=1 to N) xn*[cos(x2 + n2)/xn], where x is the vector of four equally spaced values from 1 to 2, N=10.
Below is my attempt (I am quite positive it's incorrect, though):
n = 1:10;
x = linspace(1,2,4);
[X,N] = meshgrid(x,n);
y1 = (X.^N).*((cos(X.^2 + N.^2))./(X.*N));
y2 = sum(y1);
I'd appreciate your assistance!