i have a matlab code with 3 for loops, in last for loop , there is threshold based penalization. i want trace some variables in that code and compare with plot
Mostra commenti meno recenti
respected professor.
i have code with 3 for loops. 1st for delta (which gives different plots in the same figure) 2nd for eps ( which is on x axis of figure) 3rd for Nt, giving different alpha .and in the 3rd loop pout1 and pout2 is also found which is used in threshold based penalization.
i am giving the threshold based penalization problem as screenshot as well as the figure .
i have the code for generating the figure. and i am attaching the code also.
i want to trace the value of delta, eps , Nt, alpha, pout1, pout2 and get the new alpha which is in the plot and compare these values from plot.
Thank you in advance
Risposta accettata
Più risposte (1)
埃博拉酱
il 25 Gen 2025
0 voti
If I understand you correctly, you might want to try animatedline. Use this method to keep adding new points to the line as you loop, achieving the "trace" effect you want.
3 Commenti
shahnaz fatima
il 26 Gen 2025
Spostato: Image Analyst
il 26 Gen 2025
Image Analyst
il 26 Gen 2025
Exactly what variables do you want to write out? Make sure the variables you want to write out to the CSV file are all matrices (so you need to index them in the loop), and then after the loop, call writematrix or writetable.
埃博拉酱
il 27 Gen 2025
Writing to CSV is a different question. Do you have difficulty in constructing data structure suitable for CSV or the usage of APIs related to CSV writing?
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!