Where is the problem 2

1 visualización (últimos 30 días)
john
john el 11 de Mzo. de 2013
Hi,
where is the problem
UserData.matrix(1,2)=num2cell(sym(char(strcat(get(handles.edit7,'string'),',',get(handles.edit6,'String')))))
???
  1 comentario
Walter Roberson
Walter Roberson el 12 de Mzo. de 2013
Why the heck is the "sym" in there ??

Iniciar sesión para comentar.

Respuesta aceptada

John Petersen
John Petersen el 11 de Mzo. de 2013
One too many parentheses ). Take one off.
  10 comentarios
john
john el 19 de Mzo. de 2013
I modified code in this form
UserData.matrix(1,1)=num2cell(sym(char(strcat(get(handles.edit5,'string'),'_',char(si_co_str{si_co_val}),'_',char(get(handles.edit6,'String'))))))
When I enter into edit6 number 5.4, than I got in matrix 54. But I need number 5.4....how can I solve that?
Please for help
John Petersen
John Petersen el 28 de Mzo. de 2013
Please break up the code like this
a1 = get(handles.edit6,'String');
a2 = si_co_str{si_co_val};
a3 = get(handles.edit5,'string');
a4 = strcat(a3,'_',char(a2),'_',char(a1));
a5 = sym(char(a4));
UserData.matrix(1,1)=num2cell(a5);
Then perhaps we can see what's going on.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by