Borrar filtros
Borrar filtros

Function with value after string

2 visualizaciones (últimos 30 días)
Alejandro Fernández
Alejandro Fernández el 26 de Jul. de 2020
Respondida: Alejandro Fernández el 26 de Jul. de 2020
Hi, i want to create a function with the same idea as the plot function when you write 'Marker' and then you put '+' it recognize de marker type, or when you put 'MarkerSize',15 etc.
In my case I need:
  • 'method','...'
  • 'scale',..
  • 'plott',..
Does someone know how to implement that?

Respuesta aceptada

Alejandro Fernández
Alejandro Fernández el 26 de Jul. de 2020
I found the solution, thank you so much.
if isempty(find(strcmpi(varargin,'method'), 1))
method = 'csape';
else
method = varargin{find(strcmpi(varargin,'method'), 1)+1};
end

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by