フィルターのクリア

How to extract matrix elements?

1 回表示 (過去 30 日間)
majid
majid 2022 年 12 月 28 日
編集済み: Matt J 2022 年 12 月 28 日
Hello.
I have Matrix M that each cells of it are Seperate function. so I want to get each cells function and then do something (Like intergrating) and then put it in new matrix. the below code show the matrix that I used, but I dont know how to access each cell and do something that I want. I will be apperciate that some one could help me?
thanks.
clear all
clc
syms x
M=[x 2*x 3*x; 4*x 5*x 6*x; 7*x 8*x 9*x];
% How to access each cell.

採用された回答

Matt J
Matt J 2022 年 12 月 28 日
編集済み: Matt J 2022 年 12 月 28 日
You can access them by indexing:
syms x
M=[x 2*x 3*x; 4*x 5*x 6*x; 7*x 8*x 9*x];
M(2,3)
ans = 
However, you should be mindful that you can also integrate as a matrix, without extracting one element at a time:
int(M,0,1)
ans = 

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by