i am trying to save values from the 50th slice of matrix of 101 (one value to the left of the center), which is spit out by this 'pfield' program, and graph them with the variable i have listed as 'imp"
im just having trouble figuring out how to save only the one value, curr and the 'imp' from each loop so i can plot the relation at the end
the program 'pfield' works prefectly, so i'm not worried about that, just trying to get the variable 'cur' on one axis and 'imp' on the othe
(the matrix pfield spits out is complex, thats why there is 'abs' in there)
close all
clc
addpath c:\antennas\ewa;
l=.68;
a=(.00002);
ker='a';
basis='d';
E=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
x=(0:1:100);
for a=.00002:.00001:.01
pfield(l,a,E,ker,basis);
cur=abs(ans(50))
imp=100/cur
plot(imp,cur);
hold on
end
hold off
0 Comments
Sign in to comment.