Borrar filtros
Borrar filtros

Problem with mvregress when working with cell arrays

2 visualizaciones (últimos 30 días)
lexi11
lexi11 el 18 de Abr. de 2017
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.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by