필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to handle unknown size of arrey

조회 수: 3 (최근 30일)
Chaudhary P Patel
Chaudhary P Patel 2020년 2월 2일
마감: MATLAB Answer Bot 2021년 8월 20일
Actually i am going to use structural data that is very large and i have to use it one by one and i do not know what is its size. so please help me how can i handle it.
  댓글 수: 3
Chaudhary P Patel
Chaudhary P Patel 2020년 2월 3일
sir i have a acceleration data for a dynamic struture which i have to create an array form for the further analysis.
Rik
Rik 2020년 2월 3일
Have a read here and here. It will greatly improve your chances of getting an answer.

답변 (1개)

Star Strider
Star Strider 2020년 2월 2일
Use the size function to get the dimensions. There are other functions in and at the end of the size documentation that can provide you with similar results.
To use the results, assuming ‘A’ is your array, to index the the rows:
r_idx = 1:size(A,1);
and the columns:
c_idx = 1:size(A,2);
and other dimensions as necessary.
  댓글 수: 21
Star Strider
Star Strider 2020년 2월 3일
As I mentioned, this has gotten from something I am comfortable working with (general MATLAB coding in this instance) to structural engineering that is beyond my expertise.
I am stopping here, intending that someone with relevant expertise continue it.
You will likely need to use a loop to multiply your (8x8) mass matrix by individual single elements of your acceleration vector. What you then do with the result, I have absolutely no idea.
Beyond that, please do not use the eval function! There are much better and more efficient ways of doing what you want.
Walter Roberson
Walter Roberson 2020년 2월 3일
Do not use importdata. Use readtable

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by