필터 지우기
필터 지우기

How to manipulate matrices to get the same dimensions?

조회 수: 1 (최근 30일)
desert_scientist90
desert_scientist90 2019년 11월 25일
답변: Pravin Jagtap 2019년 11월 27일
Hi I am trying to perform a regression analysis between two matrices. The first one has the dimensions of 145*35*40 when reshaped to 2d it gives matrix 5365*40. The other one is a 141*71*38 when reshaped to 2d it gives a matrix of 10011*38. How can I delete rows and columns to match the dimensions? Apologies in advance if this is a silly question. Thanks
  댓글 수: 3
desert_scientist90
desert_scientist90 2019년 11월 25일
X and Y are latitude and longitude Z is the years, do you think it will be a good approach to try logical indexing?
Star Strider
Star Strider 2019년 11월 25일
Logical indexing is not relevant at present., at least with respect to the information you have presented The problem is that your matrices do not appear to be compatible with respect to their dimensions and with respect to doing any regressions with them.

댓글을 달려면 로그인하십시오.

채택된 답변

Pravin Jagtap
Pravin Jagtap 2019년 11월 27일
Hello,
From your question data representation i.e. ‘X’ (n by m) and ‘Y’ (n by 1) is not very clear for fitting ‘Y=Xβ’ (where m = # of features and n is # of datapoints).
It very easy to manipulate the matrices when the features and data representation is clear to perform the regression using MATLAB. Please refer to following documentations for getting clarity on the issue:
Kind Regards
~Pravin

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by