Clear Filters
Clear Filters

Problem with mvregress when working with cell arrays

2 views (last 30 days)
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.

Answers (0)

Community Treasure Hunt

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

Start Hunting!