フィルターのクリア

how to fix "Enter input arguments by typing them now?"

6 ビュー (過去 30 日間)
nick
nick 2016 年 12 月 20 日
I want to use this public code,but when I run the code I have this message:
Error in gs_plane (line 46)
[n,m,~] = size(Inten);.
I defined Inten. How can I fix it?
% Inputs:
% - Inten: Stack of intensity images
% - I0_idx: center image plane index in stack
% - zvec: vector indicating z values for images in stack
% - num_imgs: number of images to use on either side of the center plane
% - ps: pixel size
% - lambda: wavelength
% - N: number of loops to perform
%
% Outputs:
% - phi: phase matrix corresponding to intensity at center plane
% recovered by the algorithm
%
% Notes:
% - INPUT IMAGES [I0, I1, I2] MUST OF EQUAL SIZE.
% - The units for ps, lambda, and dz MUST BE CONSISTENT.
% - dz is the distance between I0 and I1, should be the negative of the
% distance from I0 and I2
%
% Laura Waller, Gautam Gunjala, July 2014
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [ phi ] = gs_multiple_plane( Inten, I0_idx, zvec, num_imgs, ps, lambda, N )
%
[n,m,~] = size(Inten);
E0_est = sqrt(Inten(:,:,I0_idx)).*exp(1i*zeros(n,m));
%
for iternum = 1:N
%
% Propagate forward and replace with measured intensity
prop = propagate(E0_est, lambda, zvec(I0_idx+1:I0_idx+num_imgs), ps);
prop = sqrt(Inten(:,:,I0_idx+1:I0_idx+num_imgs)).*exp(1i*angle(prop));
%
% Propagate all planes back to center
for i = 1: num_imgs
prop(:,:,i) = angle(propagate(prop(:,:,i),lambda, ...
-1*zvec(I0_idx+i),ps));
end
%
% Replace with center plane intensity
E0_est = sqrt(Inten(:,:,I0_idx)).*exp(1i*mean(prop,3));
%
% Flip stack for negative propagation
stk_temp = flipdim(Inten(:,:,I0_idx-num_imgs:I0_idx-1),3);
z_temp = flip(zvec(I0_idx-num_imgs:I0_idx-1));
%
% Propagate backward and replace with measured intensity
prop = propagate(E0_est, lambda, z_temp, ps);
prop = sqrt(stk_temp).*exp(1i*angle(prop));
%
% Propagate all planes back to center
for i = 1: num_imgs
prop(:,:,i) = angle(propagate(prop(:,:,i),lambda, ...
-1*z_temp(i),ps));
end
%
% Replace with center plane intensity
E0_est = sqrt(Inten(:,:,I0_idx)).*exp(1i*mean(prop,3));
end
%
phi = angle(E0_est);
  2 件のコメント
per isakson
per isakson 2016 年 12 月 21 日
編集済み: per isakson 2016 年 12 月 21 日
  • gs_plane &nbsp and &nbsp gs_multiple_plane &nbsp are they the same function?
  • What release of Matlab?
  • "I defined Inten." &nbsp What value did you assign to &nbsp Inten ?
  • "how to fix "Enter input arguments by typing them now?"" &nbsp How does that question relate to &nbsp Error in gs_plane (line 46) ?
Waldemiro Kubucama
Waldemiro Kubucama 2020 年 8 月 1 日
Hello, first press button "Run" in Matlab and after only you press the button "ENTER" i your computer. I think your problem will be solved.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

タグが未入力です。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by