필터 지우기
필터 지우기

Repeating a code n-times to obtain n-arrays

조회 수: 1 (최근 30일)
Agnieszka Dybalska
Agnieszka Dybalska 2020년 12월 2일
댓글: Agnieszka Dybalska 2020년 12월 3일
Hi,
I have a code and wish to do small "simulation". The code generates y,x arrays of 10 values, plot them and extract the values a,b from a regresion line.
Also, I obtain R2 for that line. The last result is an array, RESULT = [a,b, R2].
If I wish to reapeat a code n-times, how to built a loop?
How to gather results to compare later?
Another issue is plotting the x,y to get values a,b of the linear regresion line. I don't need the Figure, but I couldn't find a way to skip it.
Do you have a good ideas how to solve this? I am not an experienced user, it is my first matlab code.
Thank you for any help,
Aga.
  댓글 수: 14
Rik
Rik 2020년 12월 3일
You can activate the smart indent by selecting your code in Matlab and clicking the button in the lint, or use the ctrl-i shortcut.
You can activate a break point by clicking on the dash in front of a line number.
Agnieszka Dybalska
Agnieszka Dybalska 2020년 12월 3일
Thank you, I will do and check the possibilities. I just solved the data problem ;) , I will go to check rest afterwards, but probably tomorrow sinc it is close to midnight for me.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by