How do I print one variable from solve() ?
古いコメントを表示
Hello,
I'm trying to print the variable's values obtained after using solve() function. Here is a portion of my code and what I intend to do:
primereq = 18 * A - 8 * B == 0;
segundaeq = -1 * A - 18 * B == 5;
cofval = solve([primereq,segundaeq],[A,B]);
A == cofval.A;
B = cofval.B;
fprintf('El valor de A es %d y el valor de B es %d',A,B);
What would be the correct way to stract the values of the variables A and B from cofval while I use fprintf function?
Thank you for your attention!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Number Theory についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!