필터 지우기
필터 지우기

How to do ... in Matlab?

조회 수: 4 (최근 30일)
Odelia
Odelia 2013년 12월 2일
이동: Voss 2024년 4월 13일
Hello,
I need to know how to do few things in Matlab. It would be easier to show you the whole code, i need to do what is written in the lines that start by % (except for %dW, for the moment at least).
Here is the code i'm working on:
N = 10;
t = 1:N;
d = 3;
R = 2*pi*rand(6);
for i = 1:6
for j = 1:6
W(i,j) = 6*(i-1) + j;
nc = %integer of W(i,j) + 2
%dW = differences in W
for dt = 1:length(t);
g(etha) = exp(-(etha^2) / (2*dt)) / (2*pi*dt)^(d/2);
R = R + etha * sqrt(2*1/2*dt);
W = W * exp(-dW * dt);
end
if W(i,j) > 1 && nc >= 2
% create nc copies of R(i,j) of which W = W-1
elseif W(i,j) < 1
% delete R(i,j) of which W = 1-W
end
end
end
In addition, g(etha) is supposed to be a probability density, and the etha that goes out from it is this i have to insert in R (the line after g(etha)). Does anybody know how i have to set this?
Thank you very much,
  댓글 수: 2
Jacob
Jacob 2024년 4월 13일
이동: Voss 2024년 4월 13일
what is the equivalent of <= in matlab
Voss
Voss 2024년 4월 13일
이동: Voss 2024년 4월 13일

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by