Borrar filtros
Borrar filtros

excel Input with condition

1 visualización (últimos 30 días)
Hamid
Hamid el 11 de Nov. de 2015
Comentada: Hamid el 13 de Nov. de 2015
Hi everyone,
I'm gonna write an app that needs many inputs. after inserting inputs, some values will be select from some tables with many raws and columns.
for example
if material==copper then Ko=1,K1=2,K3=4 ...
else if material==aluminum then Ko=20,K1=11,K3=-9 ...
else if ...
and so on
what should I do for the best?

Respuesta aceptada

Image Analyst
Image Analyst el 12 de Nov. de 2015
if strcmpi(material, 'copper')
Ko=1;
K1=2;
K3=4;
elseif strcmpi(material, 'aluminum')
Ko=20;
K1=11
K3=-9
end
That's about all we can say with what you gave us. We'd need specifics to provide any more code. There's a lot you can do with MATLAB but unless we know what it is, we can't offer advice other than to look at this link: http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab
  7 comentarios
Image Analyst
Image Analyst el 13 de Nov. de 2015
Tables did not exist in R2009 either. They only came into existence in R2013b. They're very useful and maybe 6 years is long enough for you to go with an old version - time to upgrade/modernize so you can use the concepts the rest of us are all talking about and using now.
Hamid
Hamid el 13 de Nov. de 2015
ok, thanks.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by