Acessing numerical matrix in symsum function
Mostrar comentarios más antiguos
Hello,
I'm having some trouble trying to run this code
clc;
clear;
close all
%%Imagem
IM = [1 2 3; 4 5 6; 7 8 9]
im = sqrt(-1);
%%Data
ind = 3;
omeg = 2^(-((ind+2)/2));
sig = (2*pi^2)/omeg;
thet = 0;
%%first
% J = sum(0,k)[f(k,y) H(x - k) S(x-k)
y = 0;
syms k x
%soma = IM(y+1,k+1)*exp(im*omeg*sin(thet))*exp(-0.5*((x-k)/sig)^2);
J0 = symsum(IM(y+1,k+1)*exp(im*omeg*sin(thet))*exp(-0.5*((x-k)/sig)^2), k, 0, 3)
I got the following error:
Error using sym/subsindex (line 766) Invalid indexing or function definition. When defining a function, ensure that the arguments are symbolic variables and the body of the function is a SYM expression. When indexing, the input must be numeric, logical, or ':'.
How can I get values from a numeric matrix in symbolic sum?
Thank you
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Code Performance en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!