Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Need help with importing database with text field in Regressiontree

2 visualizaciones (últimos 30 días)
mohamed mizan
mohamed mizan el 20 de Ag. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
i have database car and i have field michenicname and location how can i use carname ?
I have tried X=[michenicname location Horsepower Weight]
load carsmall % contains Horsepower, Weight, MPG X = [Horsepower Weight]; rtree = fitrtree(X,MPG)

Respuestas (1)

Tom Lane
Tom Lane el 23 de Ag. de 2014
You don't say what your data looks like and what problem you are having.
I'm guessing the michenicname variable is text and that's why you're having a problem. You can't concatenate that with numeric variables. Your best bet may be to code the unique string values as group numbers. The grp2idx function may be helpful.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by