How to define a symbolic function for this equation?
조회 수: 1 (최근 30일)
이전 댓글 표시
Where P_ij are data points.
댓글 수: 4
Dyuman Joshi
2023년 1월 2일
편집: Dyuman Joshi
2023년 1월 2일
How will you multiply x^i*y^j and P_ij? The first term is numeric or symbolic, and the latter term is a cell.
I don't understand what is it that you are trying to do.
I presume that P_ij is a 2D cell array with each element having 3 values for 3 co-ordinates.
답변 (1개)
Kone
2023년 1월 2일
You can use the 'syms' function to create symbolic variables for each of the inputs and then use them to define the function. The 'subs' function can also help evaluate particular values of your variables.
something like this
syms x y p_ij;
S(x, y, p_ij) = x .* y .* p_ij
Ans = subs(S, [x, y, p_ij], [3,3,{1}])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Variables, Expressions, Functions, and Preferences에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!