Problem with mvregress when working with cell arrays
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a problem when using multivariate regression function (mvregress) available in matlab. I have a cell array with 20 cells in each of which there are three values as inputs and my target output is a vector with 20 values. When I load this data and call mvregress function, it gives the error: "Undefined function 'isnan' for input arguments of type 'cell'."
To eliminate this problem I tried using: data = cellfun(@isnan,originaldata,'UniformOutput',false)
But this makes all my values zero.
My code is given below:
load mywork1.mat
[beta,Sigma, resid] = mvregress(targetvalues',originaldata)
Since it gives the error ("Undefined function 'isnan' for input arguments of type 'cell'."), I tried the following
data = cellfun(@isnan,originaldata,'UniformOutput',false)
But then all my data cells are replaced with zeros.
How can I resolve this issue and perform multivariate regression on these data? I have attached the data set. Thank you in advance.
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!