I have one value of "strain(:,:,1)" in 3*1 matrix. i need value of strain(:,:,2), strain(:,:​,3).......​strain(:,:​,N) means nth term.in each layer i need same value of strain. how can i copy value of strain for nth term.

2 ビュー (過去 30 日間)
Triveni
Triveni 2015 年 10 月 16 日
コメント済み: Walter Roberson 2015 年 10 月 16 日
strain(:,:,1)
ans =
0.0000
0.0017
-0.0018

採用された回答

Walter Roberson
Walter Roberson 2015 年 10 月 16 日
This would have been so much easier if you hadn't wanted the result to be per layer. What I would have suggested is using
T = arrayfun(@(pane) q(:,:,pane) * curvature, 1 : size(q,3), 'Uniform', 0);
curveatureqi = cell2mat( T );
Notice the lack of the reshape(), which was only needed to get the answer to be per layer. With this version, the result is going to be a 3 x 20 array which you can then easily index into.
  2 件のコメント
Triveni
Triveni 2015 年 10 月 16 日
No no...this is different case....i have to copy into mat and reshape. i have to solve very complex equation of nth layer that's why i need each value from each layer and multiply each layer. please tell me command for copy strain
Walter Roberson
Walter Roberson 2015 年 10 月 16 日
If strain is a 3 x 1 x 20 matrix then strain(:,:,n) just like you have.
If strain is a 1 x 1 x 20 cell matrix, each element of which is a 3 x 1 matrix, then strain{1,1,n} or equivalently in that situation, strain{n}

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStress and Strain についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by