Undefined function 'symsum' for input arguments of type 'double'

Can someone explain me how can I correct this error "Undefined function ' symsum' for input arguments of type 'double'"
function [ yij ] = SPCmethod(yij,w)
sym n;
rep = 100;
for i = 1:w
yij(i) = mean (symsum(yij,i,1,rep))/rep
end

댓글 수: 3

What is the data type and size() of yij being passed in?
What is it that is to be summed?
symsum() will give back a scalar if its first parameter is scalar, so it is not immediately clear why you want to mean() the result.
Laura Barroso
Laura Barroso 2018년 3월 29일
편집: Laura Barroso 2018년 3월 29일
I have to apply this sum to a M/M/1 queuing server simulation. It is not scalar, it's a matrix. I have another function that runs this into MM1, so the size of yij depends on the number of replicas of M/M/1 queuing server simulation.
What is the data class of yij? You mention it is a matrix, but is it a matrix of double or a matrix of symbolic constants or a matrix of formulae?

댓글을 달려면 로그인하십시오.

 채택된 답변

Walter Roberson
Walter Roberson 2018년 3월 29일
For numeric array yji,
y_bar_i = mean(yji);
There should not be any loop: your other function that runs this is doing the looping.
There would only be a loop at the level that is generating multiple yji matrices.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

질문:

2018년 3월 28일

답변:

2018년 3월 29일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by