Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Request to assist:-

1 回表示 (過去 30 日間)
Kushal Jagtap
Kushal Jagtap 2020 年 5 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have matrix A=[1,0,3; 0,5,6; 7,8,9] and
I expect output:- x1 = 3; x5 = 6; x7 + x8 = 9;
without any single quote or double quote to variable.
Is there any way to get it?

回答 (2 件)

KSSV
KSSV 2020 年 5 月 25 日
A=[1,0,3; 0,5,6; 7,8,9] ;
iwant = A(1,3)+A(2,3)
  3 件のコメント
KSSV
KSSV 2020 年 5 月 25 日
are you looking for:
syms x1, x5, x7, x8
x1 == 3 ;
x5 == 6 ;
x7+x8 == 9 ;
Kushal Jagtap
Kushal Jagtap 2020 年 5 月 25 日
Yes, I just want three equations you mentioned.

Image Analyst
Image Analyst 2020 年 5 月 25 日
Without any other guidance, like how the various x are related to the A, here is one way that will work:
function [x1,x5,x7,x8] = YourFunction()
x1 = -3;
x5 = 6;
x7 = 2; % Whatever you want.
x8 = 9 - x7;
For more help, see

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by