Solving 4 symbolic simultaneous equation -- please help!

조회 수: 2 (최근 30일)
Omar Khammash
Omar Khammash 2020년 10월 23일
댓글: Omar Khammash 2020년 10월 24일
I am trying to use the following code to solve for a b c d in terms on n and t. but i get an error saying:
Reference to non-existent field 'a'.
Error in Shape_builder (line 7)
S.a
clear all; close all; clc;
syms a b c d n t
eqns=[a+b+c+d==0, d==0, a*n^3+b*n^2+c*n+d==t, 3*a*n^2+2*b*n+c==0];
S=solve(eqns);
S.a
S.b
S.c
S.d

채택된 답변

Walter Roberson
Walter Roberson 2020년 10월 24일
You are not telling solve() which variables to solve for, and it happens to pick c d n t to solve for.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by