Convert series of analytical solutions to matrix vector format
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello, I have three analytical solutions solutions as a result of differientiating the same equation with respect to three different variables (C3, C4, and C5). I wish to convert the solutions in matrix vector format as followed:
I either wish to determine the constants Ai,j or directly convert my solutions to the matrix format. Thanks in advance!
Code:
syms x I E0 B l C3 C4 C5 F kt
V1 = int(1/2 * I * E0 * (1 + (B-1) * x/l) * (2*C3 + 6*C4*x + 12*C5*x^2)^2, x, 0, l);
V2 = int(1/2 * F * (2*C3*x + 3*C4*x^2 + 4*C5*x^3)^2, x, 0, l);
V3 = 1/2 * kt * (C3*l^2 + C4*l^3 + C5*l^4)^2;
V = V1 - V2 + V3;
dV1 = diff(V,C3)
dV2 = diff(V,C4)
dV3 = diff(V,C5)
댓글 수: 0
채택된 답변
Walter Roberson
2024년 3월 18일
syms x I E0 B l C3 C4 C5 F kt
V1 = int(1/2 * I * E0 * (1 + (B-1) * x/l) * (2*C3 + 6*C4*x + 12*C5*x^2)^2, x, 0, l);
V2 = int(1/2 * F * (2*C3*x + 3*C4*x^2 + 4*C5*x^3)^2, x, 0, l);
V3 = 1/2 * kt * (C3*l^2 + C4*l^3 + C5*l^4)^2;
V = V1 - V2 + V3;
dV1 = diff(V,C3);
dV2 = diff(V,C4);
dV3 = diff(V,C5);
[A, b] = equationsToMatrix([dV1; dV2; dV3], [C3, C4, C5])
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Numbers and Precision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!