필터 지우기
필터 지우기

how to vectorize these for loop

조회 수: 1 (최근 30일)
Anita pawar
Anita pawar 2017년 9월 12일
댓글: Rik 2017년 9월 12일
clc;
clear all;
close all;
a=[1,3,8];
for i=1:3
b(:,:,i)=sisobnds(a(i),w,wbd,ws,p,R,nompt);
end
plotbnds(b(:,:,1))
plotbnds(b(:,:,2))
plotbnds(b(:,:,3))
  댓글 수: 3
James Tursa
James Tursa 2017년 9월 12일
The loop only has 3 iterations. Even if vectorizing is possible with the sisobnds function, how much do you think it will help?
Rik
Rik 2017년 9월 12일
Also a general tip: don't use clear all,close all. Use functions so separate workspaces and variables. If you insist on using it, use clear variables, so you can still use breakpoints.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by