필터 지우기
필터 지우기

how to avoid writing a script for every input again

조회 수: 2 (최근 30일)
Jaber Gharib
Jaber Gharib 2018년 3월 6일
댓글: KSSV 2018년 3월 7일
I have a series of species and I need to get a matrix of each component using a for loop. I have to repeat the code for each species, though it does not seem to be a sensible way. I tried to use for loop to avoid the repetition but the thing is for loop replace the previous ones.
  댓글 수: 2
James Tursa
James Tursa 2018년 3월 6일
The general advice here would be to write a function that contains the code common to the processing you need to do.
KSSV
KSSV 2018년 3월 7일
Write your code into a function......call the code and store the value for every loop. Show us your code..we will help you.

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

답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by