Good morning. I request your help with a very strange problem that is happening to me. It happens that I have a code (of 664 lines of code) in which there is a very punctual part in which I use the function -diff-. The programming in said worked well and according to my needs, but then I had to add some lines of code before the part that contained the programming with the function -diff- (this part of the code that I had to add helped me to create it a user from the matlab help forum, here the link: https://la.mathworks.com/matlabcentral/answers/468864-how-can-i-show-a-matrix-of-type-cell-in-a-msgbox?s_tid=prof_contriblnk). The lines of code that helped me create the partner worked wonders for what I needed, however the part that I had programmed (the one that contained the -diff- function) had stopped working, showing an error:
469 Num_nodos = ( NodosT ( 1:FxNT , 2 ) )' ;
470 X = diff(Num_nodos)~=0;
Index exceeds matrix dimensions.
Error in form2>CalcularDin_Callback (line 470)
X = diff(Num_nodos)~=0;
hObject handle to CalcularDin (see GCBO)
eventdata reserved - to be defined in a future version of MATLAB
handles structure with handles and user data (see GUIDATA)
I do not know if it is necessary to send you all my code lines before and after the introduction of the code lines.
I enclose all my code lines before and after (in two zip) of the introduction of the code lines. The error occurs on line 614 of the code with the new programming (a zip file named "latest").
The enter to get to that line of code does as follows:
1) In the "form1.fig" the "import" button is given and this file is placed in the excel, then the "Matrix rigides K's" button is given
2) The "form2.fig" is automatically opened where you can fill the fields with this information:
* In the table of 3 rows: -file 1: floor: 3, mass: 30000 -file 2: floor: 2, mass: 20000 -file 3: floor: 1, mass: 10000
* Number of porticos (edit text): 1
* Panel: Fv: 1.9 Fa: 1.3 Aa: 0.25 Av: 0.25 I = 1.
3) Click on the button -calculate-
I hope someone helps me find where the error may be, since it does not seem to be obvious at all. Thank you.