How do I make an executable system solver?
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to make an executable to import and solve the following system of equations from a text file using MATLAB:
[K]{u} = {F}
for example,
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/795584/image.png)
This is what I've tried:
u=cell2sym(textscan(fopen('arrDisp.txt'),'%s'))
F=cell2sym(textscan(fopen('arrForce.txt'),'%s'))
K=load arrStiffness.txt
s=solve(F==K*u)
st = structfun(@double, s, 'uniform', 0)
writetable(struct2table(st), 'sol.xlsx')
It does find the solution, but I cannot compile it because the vectors {F} and {u} contains symbols like u2 and u3.
So, is there any way to make it work?
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!