The input was too complicated or too big for MATLAB to parse.

12 visualizaciones (últimos 30 días)
Luca Re
Luca Re el 30 de Jun. de 2024
Comentada: Luca Re el 30 de Jun. de 2024
hi, i've a long code and i receive this error..
To fix it i want to reduce code using vectorialization
for i=1:c
if STR_type(i)==1 %%se sono aggregate
SumCTR_color(b(i),:)= col(i,:); %%cosi nel draw del SumCTR_strum gli do il colore uguale
end
legend_lines(i)=plot(Ax_Eq,XDates,TE_strum(:,i)','DisplayName',STR_name{i},'Color',col(i,:),'LineWidth',width_arr(i));
text(Ax_Eq,r-2,TE_strum(end,i),strcat({' '},num2str(i)),'Color',col(i,:),'Interpreter','none');
%%******** COLORA OOS *********
if app.OOScolorCheckBox.Value %%mi colora di nero da dove inizia solo l'OOS (se ci sono 4 sistemi prende l'OOS piu' recente!!)!
if isdatetime(OOS_strum(i))
[~,xx_]=find(OOS_strum(i)<=XDates,1,'first'); %%max perche prendo l'OOS piu' recente!
plot(Ax_Eq,XDates(xx_:end),TE_strum(xx_:end,i)','Color',"black",'LineWidth',width_arr(i));
end
end
%%******************************
end
how can i do it? this is a small piece of a big code
  4 comentarios
dpb
dpb el 30 de Jun. de 2024
I've never seen that before and the code itself although it could probably be streamlined, doesn't look all that complicated so one must presume it's tied into what else is going on with the app and the complexity of it.
We, of course, have no hope of running the code because we don't have data nor the gui that it all relies on; the first suggestion I would have would be to comment out the routine entirely from the app and see if you can then load/run the gui alone.
If that fails, you know the problem is more fundamental; if it works, then begin to "divide and conquer" -- comment out all the function except the call and the return/end and see if still runs. Then add in pieces in chunks until it breaks again (presuming you can first get anything to run by eliminating stuff).
However, one would wonder just what is TE_strum and how big is it?
Luca Re
Luca Re el 30 de Jun. de 2024
It is not big....max is 50 element in arraycell

Iniciar sesión para comentar.

Respuesta aceptada

Steven Lord
Steven Lord el 30 de Jun. de 2024
What exactly did you expect this section of code to do?
OOS_strum=OOS_strum(:,b);lucadrive-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------app.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oospredyu
Why do you have so many - signs?
Did you intend this to be a visual divider between the command lucadrive and the attempt to index into the app object? If so you're missing a comment character before the first of those minus signs. The code after that string of minus signs also looks like it's missing some spaces between oos and the app variable.
  4 comentarios
Steven Lord
Steven Lord el 30 de Jun. de 2024
I downloaded the file and opened it up in the Editor. I saw the long string of minus signs on line 39.
s = evalc('dbtype 39 MPV_Draw_Graph.m')
s =
' 39 OOS_strum=OOS_strum(:,b);lucadrive-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------app.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oosapp.Eq.equity_stat.oospredyu '
numberOfMinusSigns = nnz(s == '-')
numberOfMinusSigns = 1099
I think that qualifies as "too many prefixed operators". [Though the first is a minus, - operator, the rest are uminus, - operators.]
Luca Re
Luca Re el 30 de Jun. de 2024
You are right There was a word "LucaDrive" in the end I don't know why in that piece of code..! thanks I solved it

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import and Analysis en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by