https://www.mathworks.com/matlabcentral/answers/questions.atomMATLAB Answers — New Questions2016-12-07T15:05:20Ztag:www.mathworks.com,2005:Question/3156272016-12-06T11:21:07Z2016-12-07T15:05:20ZError in show Semilogy<p>i have this graph that show BER after demodulation.</p><img src = "/matlabcentral/answers/uploaded_files/64858/Capture.PNG"><p>but in want to show BER after Equalizer too. So i can analysis BER from that graph.
so i add this code " semilogy(EbNo,ber,'-or');".</p><p>but get error:
Error in Vector must be the same length.
what's wrong with my code? thank you in advance</p><p>this is my code :</p><pre class="language-matlab">%% MMSE
clear
disp('MMSE');
M = 8;
data = rand(1,501,1)'; %Generate random data symbols.
data(data<0.5)=0; data(data>=0.5)=1;
</pre><pre class="language-matlab">ber = 1; %Initializing
EbNo = 5;
i=1;
</pre><pre class="language-matlab">while ber(end) >= 1e-3
i=i+1;
EbNo(i) = EbNo(i-1) + 1;
ber(i-1) = berfading(EbNo(end),'psk',M,2);
end
</pre><pre class="language-matlab">y = awgn(data,EbNo(end)); y(y<mean(y))=0; y(y>=mean(y))=1;
</pre><pre class="language-matlab">PSK_mod = pskmod(y,M,pi/M);
PSK_demod = pskdemod(PSK_mod,M);
</pre><pre class="language-matlab">phasemod=PhaseMod(y);
phasedemod=PhaseDemod(phasemod);
</pre><pre class="language-matlab">eqlms = lineareq(8,lms(0.003)); %ekualizer
EQ = equalize(eqlms,PSK_demod,data); EQ(EQ>=0.5)=1; EQ(EQ<0.5)=0;
</pre><pre class="language-matlab">[m,n] = biterr(data,PSK_demod);
fprintf('BER after demodulation: %f.\n',n);
[m,n] = biterr(data,EQ);
fprintf('BER after equalizer: %f.\n',n);
fprintf('Thus BER decreases after Equalizer \n');
</pre><pre class="language-matlab">berMMSE = ber; EbNoMMSE = EbNo(1:length(ber));
</pre><pre class="language-matlab">figure();
semilogy(EbNoMMSE,berMMSE,'-or'); grid on; grid minor;
% axis([0 14 10^-5 0.5])
semilogy(EbNo,ber,'-or'); grid on; grid minor;
grid on
legend('sim-mmse');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('Bit error probability curve for 8PSK with MMSE equalizer');
</pre>raizal muttaqinhttps://www.mathworks.com/matlabcentral/profile/authors/5602270-raizal-muttaqintag:www.mathworks.com,2005:Question/3158262016-12-07T14:45:43Z2016-12-07T15:05:13ZCan I use the minimax optimization algorithm for multiple variables?<p>In my problem, I set 3 separate threshold values which are then used to group my dataset in four sub-groups. Then I calculate mean values or sums in specific variables of the subgroups.</p><p>Can I use the minimax algorithm to find the optimized (minimum) 3 thresholds, that will give me the maximum values of the specific sums and means that I am looking for?</p>Emmanouil Barmpounakishttps://www.mathworks.com/matlabcentral/profile/authors/5881168-emmanouil-barmpounakistag:www.mathworks.com,2005:Question/3158272016-12-07T15:00:19Z2016-12-07T15:00:19ZHow Lexicographical sorting is done for image?<p>How Lexicographical sorting is done for image??plz someone explain this.Thanks in advance :)</p>Kanwal Kaurhttps://www.mathworks.com/matlabcentral/profile/authors/9212294-kanwal-kaurtag:www.mathworks.com,2005:Question/3154802016-12-05T15:29:40Z2016-12-07T14:55:55ZNAR network outputing previous (t-1) value. Why?<p>Hello,</p><p>I have a problem with the MATLAB NAR network, which I have noticed elsewhere (I'll explain a bit later on). I'll explain this in layman's terms:</p><p>Basically, when I load a time series into MATLAB (for example, a stock price over time, spanning, say 5 years), I have a suitable timeseries where I would like the NAR network (say, with delay=5), to learn the past (previous) five closing prices and it's relation to the next closing price.</p><p>The NAR will learn this, one step at a time, looking at the previous 5 prices, and calculating their relation to the current price (which the network is also shown). The network will advance through all the 5 years of data, learning by example (current position price vs last 5 prices), etc., etc.</p><p>That all seems good and well. However, with data that the NAR has already seen, whenever I ask the network 5 previous prices (which it has seen), it should output (calculate) the next price (which it has also seen during training). This is what I would expect of any network (unless I'm totally wrong here).</p><p>But instead, the NAR outputs the previous (t-1) price. So, basically (where p = price):</p><p>I expect:
(p(t-5), p(t-4), p(t-3), p(t-2), p(t-1)) = p(t)</p><p>but the NAR gives me:
(p(t-5), p(t-4), p(t-3), p(t-2), p(t-1)) = p(t-1)</p><p>(this with data that the NAR has already seen)</p><p>Why is this?</p><p>I also built an Elman network using Encog, and got basically the same results. Tried a Deep Belief network using Accord.NET and the same thing. Tried standard feedforward, Jordan, SVM, RBF, etc. Nothing does it. Why?</p><p>They are all acting like naive predictors.</p><p>Independently from my code/data I have used, I've tried with a simple timeseries (1, 2, 3, 4, 5 .... 2000) and all networks learn perfectly, but not with stock prices.</p><p>I've also tried using deltas, log, sqrt, etc. with no luck (on stock data).</p><p>I've tried several delays: d=5, d=7, d=10, d=20, d=30, d=40, d=50, d=100 and only d=50 turned up not exactly a naive predictor, but results were significantly off using just training data.</p><p>These experiments have been made only with training data.</p><p>Why? Is stock price data "unlearnable"?</p><p>I've seen this question asked some other places, but no satisfactory answer.</p><p>As a sidenote, all MATLAB code was done using nnstart.</p><p>Thanks!</p>Molasarhttps://www.mathworks.com/matlabcentral/profile/authors/9305758-molasartag:www.mathworks.com,2005:Question/3157482016-12-07T03:11:29Z2016-12-07T14:55:11Zvpasolve returns empty sym 0-by-1<p>I can't figure out why I am receiving an empty sym when there is a solution which is Teq3 which is plotted in the matlab code as well that I plotted in figure 4.</p><pre class="language-matlab">syms d1 cond
eqn=abs((5.135479634e-12*exp(d1*909.9211894i + d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.265435964i)*(- 126390.7547 + cond*173705.0375i)^(1/2))/(cond*(0.0000000001075135196 - 0.0000000004227389634i) - exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*0.0000000003558928568i + exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*0.0000000008123275775i + exp(d1*1819.842379i)*0.0000000003558928568i + 3.177678371e-12*exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*(- 126390.7547 + cond*173705.0375i)^(1/2) - 6.099385542e-13*exp(d1*1819.842379i)*(- 126390.7547 + cond*173705.0375i)^(1/2) - (- 126390.7547 + cond*173705.0375i)^(1/2)*(7.832327503e-13 - 3.079640611e-12i) - exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*(- 126390.7547 + cond*173705.0375i)*1.100165037e-15i - exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*(- 126390.7547 + cond*173705.0375i)*2.511133287e-15i + exp(d1*1819.842379i)*(- 126390.7547 + cond*173705.0375i)*1.100165037e-15i - 6.099385542e-13*exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*(- 126390.7547 + cond*173705.0375i)^(1/2) + (0.000000001094857736 + 0.0000000002784508144i)));
eqn1=10^-71/20==abs((5.135479634e-12*exp(d1*909.9211894i + d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.265435964i)*(- 126390.7547 + cond*173705.0375i)^(1/2))/(cond*(0.0000000001075135196 - 0.0000000004227389634i) - exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*0.0000000003558928568i + exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*0.0000000008123275775i + exp(d1*1819.842379i)*0.0000000003558928568i + 3.177678371e-12*exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*(- 126390.7547 + cond*173705.0375i)^(1/2) - 6.099385542e-13*exp(d1*1819.842379i)*(- 126390.7547 + cond*173705.0375i)^(1/2) - (- 126390.7547 + cond*173705.0375i)^(1/2)*(7.832327503e-13 - 3.079640611e-12i) - exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*(- 126390.7547 + cond*173705.0375i)*1.100165037e-15i - exp(2*d1*(- 126390.7547 + cond*173705.0375i)^(1/2) + 1.819842379i)*(- 126390.7547 + cond*173705.0375i)*2.511133287e-15i + exp(d1*1819.842379i)*(- 126390.7547 + cond*173705.0375i)*1.100165037e-15i - 6.099385542e-13*exp(2*d1*((- 126390.7547 + cond*173705.0375i)^(1/2) + 909.9211894i))*(- 126390.7547 + cond*173705.0375i)^(1/2) + (0.000000001094857736 + 0.0000000002784508144i)));
d1_r=260*10^-9:1*10^-9:360*10^-9;
Teq1=subs(eqn1,d1,d1_r);
Teq3=subs(eqn,cond,6.2*10^7);
Teq3=subs(Teq3,d1,d1_r);
Y1=zeros(0,length(d1_r))
for j=1:length(d1_r)
X1=vpasolve(Teq1(j),cond, [10^6 10^8]);
if X1>0
Y1(j)=X1(1)
end
clear X1
end
figure(1)
plot(d1_r,Y1)
title('Magnitude S12 Including Substrate [dB]')
xlabel('Thickness of the Thin Film'')
grid on
ylabel('Magnitude of S12')
figure(4)
plot(d1_r,20*log10(Teq3),'-r');
title('Magnitude S12 Including Substrate [dB]')
xlabel('Thickness of the Thin Film')
grid on
ylabel('Magnitude of S12')
</pre>Sean Dorishttps://www.mathworks.com/matlabcentral/profile/authors/6891459-sean-doristag:www.mathworks.com,2005:Question/3158242016-12-07T14:19:55Z2016-12-07T14:51:03Zassigning output of a for loop to an array<p>i want to put the 6 values of W into an array but i cant sry fr the silly question</p><pre class="language-matlab">E = 10;
Rt = 1000;
Rm = 0.01;
for Ri = (0:200:100)
W = error_calculation (Ri,Rt,Rm,E);
end
</pre>mohammad bahgathttps://www.mathworks.com/matlabcentral/profile/authors/8860542-mohammad-bahgattag:www.mathworks.com,2005:Question/3158042016-12-07T12:27:39Z2016-12-07T14:49:03Zhi everry one , this program is filter ? if it is filter what is the type of filter ? (YOU CAN ADD SOME COMMENT )<pre> global nfile A flag
[fil pth]=uigetfile('.dat','Enter File Name Wich You Want to Work')
file=[pth fil];
fid=fopen(file,'r');
nfile=fread(fid);
nfile=imresize(nfile,[183 1]);% it is for compression?
axes(handles.axes1)
plot(nfile,'-'), title('Original Signal')</pre><pre> figure(1),plot(nfile,'-'), title('Original Signal')</pre><pre> z=zeros(100,1);
A=[z;nfile;z]; %it is filter?
axes(handles.axes2)
plot(A,'-'),title('Original Signal With Pad')</pre><pre> figure(2),plot(A,'-'),title('Original Signal With Pad')
flag=2;</pre>serhat daghttps://www.mathworks.com/matlabcentral/profile/authors/9020070-serhat-dagtag:www.mathworks.com,2005:Question/3145102016-11-29T10:06:48Z2016-12-07T14:48:11ZHow can I set in Polyspace a *Pointer_TO_BOOLEAN to be recognized as an effective boolean type?<p>How can I set in Polyspace to recognize that a dereferenced pointer to Boolean (*Pointer_To_Boolean)is an effective boolean type? Because it recongnizes it as an unsigned char (Boolean type is "typedef unsigned char BOOL").</p><p>Thank you,</p><p>Cristian PASCALAU</p>Cristian PASCALAUhttps://www.mathworks.com/matlabcentral/profile/authors/8923457-cristian-pascalautag:www.mathworks.com,2005:Question/3158122016-12-07T13:16:28Z2016-12-07T14:42:28Zhow do i explain which eigenvector the software reports as there are theoretically an infinite number?<p>A= [1 2 -5; 3 5 3;-4 6 1]</p><p>i can find the eigen values and eigen vectors, but i don't know how to find which one has an infinite number. is there a specific command on Matlab to get this report?</p>Yusif Khelhttps://www.mathworks.com/matlabcentral/profile/authors/9332317-yusif-kheltag:www.mathworks.com,2005:Question/3158252016-12-07T14:32:45Z2016-12-07T14:33:54ZWhat is the difference between ishghandle and isgraphics?<p>This is something that I have wondered for a while. I like to do a lot of validating of things in my code, one of which is to check if some graphics object (e.g. a figure) is still valid or whether I need to recreate it.</p><p>I always tended to use ishghandle ( <i>note:</i> not ishandle which I know is different) because I didn't know about isgraphics.</p><p>But is there some subtle difference I am not understanding? The descriptions differ only by isgraphics saying it returns true for <i>valid</i> graphics handles. But ishghandle returns false on a deleted axes, closed figure etc too so I am not aware of a case in which these too differ in result.</p><p>ishghandle documentation does talk about Simulink objects, though in relation to a comparison with ishandle, but I don't have Simulink so I can't test if this is a place where ishghandle and isgraphics differ.</p><p>I guess it doesn't matter and I can use either one if they both return true or false when I want them too, I'm just curious.</p>Adamhttps://www.mathworks.com/matlabcentral/profile/authors/689032-adamtag:www.mathworks.com,2005:Question/3157312016-12-06T22:23:26Z2016-12-07T14:29:23ZHow to implement GoogleNet as a Series Netwok?<p>Recently, I have been working with DeepLearning and Matlab, I have run some examples from the official Web page and also others from Webinars.
Thanks to that I have codes to implement the well known 1000 cathegories Alex-net Convolutional Neural Network, and also I know how to build a CNN from the beginning , but now I would like to try with another Pre trained CNN , for instance GoogleNET, I downloaded the .m file from vlfeat. unfortunatly I can not use @helperImportMatConvNet@ command with this NET. tere is any way to tranform this Net into a series Network.</p><p>Thanks</p>Manuel Rioshttps://www.mathworks.com/matlabcentral/profile/authors/9271553-manuel-riostag:www.mathworks.com,2005:Question/2789172016-04-14T08:09:30Z2016-12-07T14:27:43Zrossvcclient handshake fail in Matlab2015b\ros-Jade\Gazebo-7<p>i am using matlab robotics_system_toolbox，to get my ROS-jade and Gazebo-7 working with my Matlab-2015b</p><p>I find it quite annoying that when i am following the tutorials <a href = "http://cn.mathworks.com/help/robotics/examples/read-model-and-simulation-properties-from-gazebo.html?searchHighlight=gazebo">http://cn.mathworks.com/help/robotics/examples/read-model-and-simulation-properties-from-gazebo.html?searchHighlight=gazebo</a> , and calling</p><pre class="language-matlab">ExampleHelperGazeboSpawnedModel('my_model',gazebo)
</pre><p>and error appears</p><pre class="language-matlab">Error using ExampleHelperGazeboCommunicator/startModelServices (line 334)
Failed to create a /gazebo/get_model_state service client.
</pre><pre class="language-matlab">Error in ExampleHelperGazeboSpawnedModel (line 56)
startModelServices(World);
</pre><pre class="language-matlab">[ERROR] ServiceClientHandshakeHandler - Service client handshake failed: client wants service /gazebo/get_model_state to have md5sum af0f702011820738976b120226dc9d96, but it has 4c515e936d3319c9610c559c60bfc3d4. Dropping connection.
</pre><p>the errored line is</p><pre class="language-matlab">obj.GetModStateClient = rossvcclient('gazebo/get_model_state');
</pre><p>this is WEIRED , because all other rossvcclient went nothing wrong.
like</p><pre class="language-matlab">obj.SetModStateClient = rossvcclient('gazebo/set_model_state');
obj.SetModConfigClient = rossvcclient('gazebo/set_model_configuration');
</pre><p>this handshake problem really stops me going any further,because if the get_model_state client fails, i dont know how can i get
a running model state in my Gazebo.</p><p>can anybody help? THANK YOU IN ADVANCE</p>tianxiang baihttps://www.mathworks.com/matlabcentral/profile/authors/8029824-tianxiang-baitag:www.mathworks.com,2005:Question/3157512016-12-07T03:47:38Z2016-12-07T14:27:33ZHow to request additional data from the user in a function<p>Hi,
Thanks for reading this.</p><p>I have to call a function, then it appears I need to request more data from within the function. Data the user is supposed to type on the screen. How do I do this? The problem is stated as:</p><img src = "/matlabcentral/answers/uploaded_files/64919/Capture.JPG"><p>I have to admit I'm a little unclear with regard to what the problem statement is requesting.</p>DJ Vhttps://www.mathworks.com/matlabcentral/profile/authors/1665539-dj-vtag:www.mathworks.com,2005:Question/3158212016-12-07T14:08:08Z2016-12-07T14:21:56ZHi, I have a question about this function :<p>Hi, I have a question about this function :
function y = mean(x,dim)
%MEAN Average or mean value.
% For vectors, MEAN(X) is the mean value of the elements in X. For
% matrices, MEAN(X) is a row vector containing the mean value of
% each column. For N-D arrays, MEAN(X) is the mean value of the
% elements along the first non-singleton dimension of X.
%
% MEAN(X,DIM) takes the mean along the dimension DIM of X.
%
% Example: If X = [0 1 2
% 3 4 5]
%
% then mean(X,1) is [1.5 2.5 3.5] and mean(X,2) is [1
% 4]
%
% Class support for input X:
% float: double, single
%
% See also MEDIAN, STD, MIN, MAX, VAR, COV, MODE.</p><p>% Copyright 1984-2005 The MathWorks, Inc.
% $Revision: 5.17.4.3 $ $Date: 2005/05/31 16:30:46 $</p><p>if nargin==1,</p><pre class="language-matlab">% Determine which dimension SUM will use
</pre><pre class="language-matlab">dim = min(find(size(x)~=1));
</pre><pre class="language-matlab">if isempty(dim), dim = 1; end
</pre><pre class="language-matlab">y = sum(x)/size(x,dim);
else
y = sum(x,dim)/size(x,dim);
end
</pre><p><b>*</b> The question is : What is the meaninig of the line code :
dim = min(find(size(x)~=1));
Thank's</p>Saad Saidhttps://www.mathworks.com/matlabcentral/profile/authors/9165678-saad-saidtag:www.mathworks.com,2005:Question/3158232016-12-07T14:19:15Z2016-12-07T14:19:15ZDownloading tweets from a defined period<p>Dear Matlab Community</p><p>I want to download the tweets for the whole 2015 year. Does someone know how to do this?</p><p>apple = tw.search('$apple','date',2015-01-01,'include_entities','true','lang','en');</p><p>I based my code on the matlab article "analyzing twitter with matlab" from mathworks.</p>Josef Kilanyhttps://www.mathworks.com/matlabcentral/profile/authors/9180802-josef-kilanytag:www.mathworks.com,2005:Question/3158222016-12-07T14:17:23Z2016-12-07T14:17:23ZChange of variable to plot<p>Hello everybody and thanks in advance!</p><p>I don't know how to face this problem:
I have 2 variables, "i_n" and "e_b", that are vectors, and 3 functions of this 2 variables, "h" "v" and "m", that are, of course, matrices with the sizes of the vectors "i_n" and "i_b".</p><p>I want to do a 3d plot of "h" "v" and "m" but i don't really know how to do it.
Thought something like:
i define "H" and "V" as vectors than i search for each value of the vectors the nearest values in "h" and "v", take the indices and, if for both "h" and "v" they coincide then i take that value on "m".</p><p>Do you think this could work?
Any other ideas?</p><p>Thanks,
Fabrizio</p>Fabrizio Calidonnahttps://www.mathworks.com/matlabcentral/profile/authors/6494981-fabrizio-calidonnatag:www.mathworks.com,2005:Question/3157772016-12-07T09:13:39Z2016-12-07T14:14:53ZPossibility to use Matlab Builder NE on Matlab License 349967<p>Hallo,
ist es möglich, den Matlab Builder NE auf o.g. Lizenz zu installieren und zu nutzen?
Mit freundlichen Grüßen,
Jan Hendrik Starcke</p>Jan Hendrik Starckehttps://www.mathworks.com/matlabcentral/profile/authors/3531295-jan-hendrik-starcketag:www.mathworks.com,2005:Question/287182012-02-10T21:13:24Z2016-12-07T14:12:38ZSimulink embedded function detects phantom complex value<p>I have an embedded function block in my Simulink model containing a natural log function that calculates an output value based on inputs that go in the numerator or denominator of the log. When I run the simulation, an error message pops up saying that I'm trying to take the log of a complex value. I am constantly tracking the values that go inside this function and none of them are approaching zero or a very high number, but I still keep getting an error. What do you think could be the problem?</p>Victorhttps://www.mathworks.com/matlabcentral/profile/authors/3018220-victortag:www.mathworks.com,2005:Question/120362011-07-20T15:52:05Z2016-12-07T14:08:25ZHow do I use my smart phone camera as a webcam in MATLAB?<p>I have an smartphone device with a camera. I would like to obtain and process this image data in MATLAB.</p><p>(Specifically, I have an Android device).</p>Ashish Uthamahttps://www.mathworks.com/matlabcentral/profile/authors/1297554-ashish-uthamatag:www.mathworks.com,2005:Question/3158192016-12-07T14:07:00Z2016-12-07T14:07:00ZI'm trying to create a classification system using artificial immune systems but I don't know how to create the loop properly.<p>So, I need to create a set of random detectors and then compare them with the real cases using "pdist2". When "pdist2" is under a certain value (0.5), the case is atributed as being part of the respective detector. However, this detector is only valid if it reaches a minimum number of "detections" ((size(percentage,1)/size(X,1))*3).</p><pre> X=zeros(50,16); </pre><pre> for k=1:size(X,2)
for j=1:size(X,1)
X(j,k)=percentage_min(1,k)+rand(1,1)*(percentage_max(1,k)-percentage_min(1,k));
end
end</pre><pre> D=pdist2(X,percentage);
T=zeros(size(D,1),1);
U=zeros(size(X));</pre><pre> for k=1:size(D,1)
for j=1:size(D,2)
if D(k,j)<0.5
T(k)=T(k)+1;
end
if T(k)>(size(percentage,1)/size(X,1))*3
U(k,:)=X(k,:);
end
end
end</pre><p>This part of the code is working properly. However, now I need to delete the already atributed cases, create another set of detectors (overwriting X) and use "pdist2" again, until almost all cases are atributed (lets say, per example, while size(percentage,1)>500). When I say to delete a case, I mean to delete a row of "percentage". However, when I do this inside the loop, it never stops. And I also already tried to make the loop backwards but I have the same problem.</p><pre> while size(percentage,1)>500
for k=1:size(D,1)
for j=1:size(D,2)
if D(k,j)<0.5
T(k)=T(k)+1;
percentage(k,:)=[];
end
if T(k)>(size(percentage,1)/size(X,1))*3
U(k,:)=X(k,:);
end
for m=1:size(X,2)
for n=1:size(X,1)
X(n,m)=percentage_min(1,m)+rand(1,1)*(percentage_max(1,m)-percentage_min(1,m));
end
end
D=pdist2(X,percentage);
T=zeros(size(D,1),1);
end
end
end</pre><p>This part of the code is not working, but I hope you can understand what I want. Can somebody please help me? And I have 2 other minor problems: when a case is atributed to a detector, it shouldn't be atributed to another one (T should be incremented only once by each case, so total sum should be size(percentage,1)). And when a detector is saved on U, that position shouldn't be overwritten by a new detector.</p>Eduardo Rochahttps://www.mathworks.com/matlabcentral/profile/authors/8080367-eduardo-rochatag:www.mathworks.com,2005:Question/2549922015-11-16T02:16:44Z2016-12-07T14:06:35ZHow to call abaqus from matlab？<p>Dear all，
Could you show me how to call abaqus from matlab？
I used (! abaqus job=job_1.inp),but it does not work.If you get this,please do me a favor.
thank you!</p>zhou yhttps://www.mathworks.com/matlabcentral/profile/authors/7282579-zhou-ytag:www.mathworks.com,2005:Question/3158182016-12-07T14:05:51Z2016-12-07T14:05:51Zgroot reports wrong display size<p>When I use groot() the reported display size and postions in MonitorPositions is off by a factor of 0.8. (e.g. a display that is 1920x1080 is described as 1536x864). Is this a bug or is there something else going on here?</p>Mikehttps://www.mathworks.com/matlabcentral/profile/authors/958953-miketag:www.mathworks.com,2005:Question/1837852015-03-18T11:17:26Z2016-12-07T14:00:03ZAbaqus and Matlab (Optimising the simulation parameters in Matlab by calling Abaqus as external subroutine)<p>PS: I am having a complex .inp file, any help/links/pdf will be appreciated. Many thanks for enlighting young minds.</p>PATHANhttps://www.mathworks.com/matlabcentral/profile/authors/3558073-pathantag:www.mathworks.com,2005:Question/3125482016-11-16T15:25:12Z2016-12-07T13:53:32ZMove errorbars to fit on barplot<p>Hello Matlab community,</p><p>I am trying to add errorbars to a barplot but i don't know how to get the errorbars in the right position(see picture). They should be on the 'average' bar, instead they are just in the middle of all the bars, so how can i move them? Also, how do I stop it form going negative?</p><img src = "/matlabcentral/answers/uploaded_files/63446/acc%20over%20time.png"><p>This is the generalised script I used:</p><pre class="language-matlab">timeav =
6.2000 2.4000 8.4000 8.4000 0.8000 2.0000
2.8000 1.2000 1.4000 8.4000 0.8000 1.0000
2.0000 1.0000 0.8000 3.2000 1.0000 1.4000
2.8000 2.4000 1.2000 2.2000 1.2000 2.4000
6.2000 5.6000 4.0000 8.4000 3.0000 6.2000
8.4000 8.4000 8.4000 8.4000 8.4000 8.4000
</pre><pre class="language-matlab">mtimeav = mean(timeav,2);
timeav(:,7) = mtimeav;
errortime = std((timeav(1:6,:)'));
timex = 1:size(errortime,2);
</pre><pre class="language-matlab">bar(timeav);
hold on
errorbar(timex,mtimeav,errortime,'LineStyle','none')
</pre>Jacco vDhttps://www.mathworks.com/matlabcentral/profile/authors/8187854-jacco-vdtag:www.mathworks.com,2005:Question/3157252016-12-06T21:37:13Z2016-12-07T13:47:03Zhi i will ask you if you can help me in hand detection and tracking in video sequence and in real time<p>Towards a human psychology recognition system based on the study and analysis of body gestures and emotional states.
try to detect body gestures in video sequences tracked it and then analyse it.</p>intissar khalifahttps://www.mathworks.com/matlabcentral/profile/authors/9287101-intissar-khalifatag:www.mathworks.com,2005:Question/3157392016-12-06T23:47:01Z2016-12-07T13:44:50ZHow to decide window size for a moving average filter?<p>Hello all,
I have some noisy data in the form of x and y variables. I plan to use moving average filer to get satisfactory results, yet as close as possible to the real data. I understand that higher window size means more smooth data, and hence less realistic. Is that correct? Is window size of 5 considered decent enough to establish relationship between the variables in general? Any leads are highly appreciated.
Thanks and regards,
Swanand.</p>Swanand Kulkarnihttps://www.mathworks.com/matlabcentral/profile/authors/8601675-swanand-kulkarnitag:www.mathworks.com,2005:Question/3157702016-12-07T07:15:44Z2016-12-07T13:44:38ZSyms / ezplot works for y^2 function?<p>Well, I need to sketch the region of R in the xy-plan bounded by the curves y^2 = 2x and y = x and find the area. I tried using syms and i get errors where it says SYMS not found and error in ezplot.</p>Koay Hong Vinhttps://www.mathworks.com/matlabcentral/profile/authors/9303097-koay-hong-vintag:www.mathworks.com,2005:Question/3152332016-12-03T13:44:52Z2016-12-07T13:41:16Zfilter a specific color from image<p>Hello everybody</p><p>i have a problem and it would be great if someone helps
i am trying to cut a color from an image where the result image is BW .and the color specified i want to chose is black and the rest is white .the main problem is since there was more light of the left side of the image the pixel value pattern changes for the same color over the same image,for example blue of the left has value of RGB= 106 156 183 where on the right side RGB=106 126 133 ,is there a way where i can make the brightness the same all over the image ?I mean a way of making the values of the color i see to have the same values all over the image or a same pattern?</p>Amr Mhishhttps://www.mathworks.com/matlabcentral/profile/authors/8354564-amr-mhishtag:www.mathworks.com,2005:Question/3158162016-12-07T13:40:18Z2016-12-07T13:40:18ZMatlab Function Driver: Undefined reference to wrapper function<p>hey guys,
i am using the matlab function block approach to implement a driver for external hardware on the raspi.
As written in matlab's driver guide, i use the matlab function block to call two functions, say init_func() and output_func().
The latter functions are wrapper functions that enclose the actual c code which should be compiled and downloaded to the raspi. The c-code (with the wrapper functions) lies in an external c-file. As said in the guide, I added this C-file as a custom source with the set_param command. I also wrote an extra h-file which declares my wrapper functions. I included this h-file in my c-file.
I also added this h-file as a custom source with the set_param command.
When I build the model, Matlab gets so far that it generates the c-File for the simulink block but it errors:
MySimulinkBlock.c:(.text+0x1c): undefined reference to `init_func'
MySimulinkBlock.c:(.text+0x2f8): undefined reference to `output_func'</p><p>This means that my wrapper functions are somehow not found.
Any ideas? Thanks!</p>jakkesprinterhttps://www.mathworks.com/matlabcentral/profile/authors/9146749-jakkesprintertag:www.mathworks.com,2005:Question/3154932016-12-05T16:36:14Z2016-12-07T13:37:33Zloop runs infinitely, <pre class="language-matlab">% member ship value taken by zeros initilization
U=zeros(2,3);
% **********************************************
</pre><pre class="language-matlab">% each row is randomly initialize and
% must be 1 [ i.e., summation of complete row value]
% **********************************************
for i=1:2
% for each i is 1 to 2, iteratively increased row
while(1)
total=0;
for j=1:3
U(i,j)=rand();
% generaly random value is less than one
total=total+U(i,j);
% each row, every colomn value is added to variable 'total'
end
if (total == 1)
% check value is equal to one or not,example total=1.1235
% then total considers as 1 but my point is exact total
% varible must be 'one'
break;
end
end
end
disp(U);
</pre><p><b>loop runs infinite so that please describe how to stop it</b></p>pavan kumar teegalahttps://www.mathworks.com/matlabcentral/profile/authors/8492431-pavan-kumar-teegalatag:www.mathworks.com,2005:Question/3158152016-12-07T13:36:09Z2016-12-07T13:36:54ZDetect only needed circles without thresholding <img src = "/matlabcentral/answers/uploaded_files/64948/Capture0000006.bmp"><p>I have an image of some test machine . I want to detect only 4 circles because these are used to limit the wanted range.I will use the centers of theese circles to extract only the needed image which is only the propeller.can any one help me please? Other ideas are welcome. (i dont want to use the thresholding because i have more Pictures with different intensities)</p>Yassine Zaafourihttps://www.mathworks.com/matlabcentral/profile/authors/8849383-yassine-zaafouritag:www.mathworks.com,2005:Question/3143392016-11-28T12:50:03Z2016-12-07T13:34:48ZHow do I combine regions of regionprops<p>Hello,
I use regionprops to get different regions within an image.</p><pre class="language-matlab">Obj = regionprops(~bw,{'Area','Extrema','Boundingbox','MajorAxisLength','MinorAxisLength','ConvexHull','Centroid'});
</pre><p>According to some assumptions I would like to recombine some Objs of the struct</p><p>For example I would like to combine 2 objects where the y-coordinate of the centroid is quite similar.
This means, that the some values, Area, Centroid, Bounding Box have to be recalculated.
What would be the correct way to do that?</p><p>Thanks</p>Andreashttps://www.mathworks.com/matlabcentral/profile/authors/2174434-andreastag:www.mathworks.com,2005:Question/3157712016-12-07T07:22:49Z2016-12-07T13:31:46ZMatlab trial licence expired.<p>Hello, I'm an IT engineering student and few days ago my trial licence expired, but I need matlab to do a lot of laboratory works. Is there a possible way to extend my trial time ?</p>Evaldas Surauciushttps://www.mathworks.com/matlabcentral/profile/authors/9062180-evaldas-surauciustag:www.mathworks.com,2005:Question/3150542016-12-02T09:01:41Z2016-12-07T13:29:27ZHow to transfer data from one GUI to a uitable of another GUI<p>i have a main gui with a push button and a uitable. when i click the pushbutton it will open another GUI that contains edit boxes and a pushbutton. The idea is that when i fill out the edit boxes and click the pushbutton of the second GUI it will transfer the generated result/data back to the uitable of the main GUI.</p><p>I hope this clarifies the problem. thanks</p>markhttps://www.mathworks.com/matlabcentral/profile/authors/9184723-marktag:www.mathworks.com,2005:Question/3158142016-12-07T13:28:08Z2016-12-07T13:28:08ZRaspberry pi support package incompatible with Windows 8.1. This Error shown while installing.<p>I was trying to install the raspberry pi support package. However it shows the following error.
Firmware download failed: This version of C:\MATLAB\Support Packages\R2013a\wget\wget.exe is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher.
PLEASE help me out with this problem!</p>Nida Falakhttps://www.mathworks.com/matlabcentral/profile/authors/6770867-nida-falaktag:www.mathworks.com,2005:Question/3156612016-12-06T14:00:23Z2016-12-07T13:27:57Zmatlab code erro massage where ~ used<p>Hi,</p><p>I am running matlab code but I getting error massages. The first massage I get is '?? Error: File: matlablabtest.m Line: 62 Column: 11 Expression or statement is incorrect--possibly unbalanced (, {, or [.</p><p>Also getting same error in line: 67,69,74,98,169,225,230,232,237,298 where (~)is used. I have attached the data is that help in checking it.
I have attached the m file and data in case that help to get the answer.</p><p>Regards Sarah</p>sohaila hassanhttps://www.mathworks.com/matlabcentral/profile/authors/9325040-sohaila-hassantag:www.mathworks.com,2005:Question/3157662016-12-07T06:44:29Z2016-12-07T13:23:07Zi want to concatenate two variable but getting an error..."Names of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that these arrays have the same set of fields"<p>I want to concatenate two variables.
first i loaded my data which is a matrix, to both variables then store particular part of variables in another variable and then concatenate them.
Here is my code.</p><pre class="language-matlab">t=load('2');
v=load('3');
T.a =t(:,2:size(t,2));
c=v(:,2:size(v,2));
ans=cat(2,T.a,c);
</pre><p>Here '2','3' are my files.</p><p>but i am getting error...</p><p>Error using cat
Names of fields in structure arrays being concatenated do not match. Concatenation of structure arrays requires that
these arrays have the same set of fields.</p><p>Error in Untitled3 (line 5)
ans=cat(2,T.a,c);
i think becoz when i load data it stores in variables with different field names.</p><p>Plz provide some solution . i have to use it</p>MAYANK RATHOREhttps://www.mathworks.com/matlabcentral/profile/authors/8631616-mayank-rathoretag:www.mathworks.com,2005:Question/3158132016-12-07T13:17:38Z2016-12-07T13:17:38ZIdeal Three phase transformer<p>Hello,</p><p>I am looking for ideal three phase transformer to make it in matlab simulink, but i canno't find it anywhere.</p><p>I have found this:
https://www.mathworks.com/help/physmod/sps/powersys/ref/threephasetransformertwowindings.html?searchHighlight=three%20phase%20transformer</p><p>And other one with three windings. If this is ok can somebody tell me which data to choose to collect that shows me graph?</p><p>Thank you for answer in advance.</p>androSLOhttps://www.mathworks.com/matlabcentral/profile/authors/4143235-androslotag:www.mathworks.com,2005:Question/3156702016-12-06T15:05:24Z2016-12-07T13:11:23ZConvert 24-bit ADC serial read data from 3-byte format to signed integer (int32)<p>I am receiving EEG data from a 24 bit ADC over serial. The ADC data is transmitting in 3 bytes from MSB to LSB.
The full packet is 21 bytes:</p><ul><li>The first byte is the start byte - 0xFF (255 in decimal)</li><li>Then packet number byte.</li><li>Then the next 3 bytes are the 24 bit ADC value broken into MSB LSB2 LSB1</li></ul><p>I can parse the data fine, but re-constructing a 2's complement signed int32 number is causing issues.
The values I am getting out certainly don't reflect what the ADC should be giving out.</p><p>Below are the lines to read and parse the 504 samples (which gives me 24 ADC values (504samples/21bytes = 24 values)).
I have tried uint8 instead of uchar with similar results (when I try int8 I get a invalid specified precision error).</p><pre class="language-matlab">comEEGSMT = serial(com,'BaudRate',3000000);
fopen(comEEGSMT);
rawData(1:504) = fread(comEEGSMT, 504, 'uchar');
fclose(comEEGSMT);
</pre><pre class="language-matlab">startPackets = find(rawData == 255);
bytes = rawData([startpackets+2 startpackets+3 startpackets+4]);
</pre><p>I have tried the following method to reconstruct the value:</p><pre class="language-matlab">ADC_value = bytes(:,1)*256^2 + bytes(:,2)*256 + bytes(:,3);
</pre><p>and the following line is the formula to convert the above number to volts:</p><pre class="language-matlab">ADC_value_volts = ADC_value*(5/3)*(1/(2^32));
</pre><p>The values are in the range of 4000 - 8000 microvolts with large jumps in value.
The values SHOULD be in the range of 200 - 600 microvolts with small changes.</p><p>I have found other questions relating to similar issues, but have had no success trying the proposed solutions such as in the link below: <a href = "https://uk.mathworks.com/matlabcentral/answers/137965-concatenate-3-bytes-array-of-real-time-serial-data-into-single-precision">https://uk.mathworks.com/matlabcentral/answers/137965-concatenate-3-bytes-array-of-real-time-serial-data-into-single-precision</a></p><p>Any help would be very much appreciated as I've been stuck on this for quite long.</p><p>Thanks
Mark</p>Mark O'Sullivanhttps://www.mathworks.com/matlabcentral/profile/authors/7427561-mark-o-sullivantag:www.mathworks.com,2005:Question/3157812016-12-07T09:36:56Z2016-12-07T13:11:06ZHow do I amplify my sound using soundsc?<p>I want to amplify the sound I produced using soundsc by raising the sound by a steady increase of dB. I am trying to make a hearing test so I need to increase the dB if the user cannot hear. Code:</p><pre class="language-matlab">fs = 8000; %sampling rate
dur = 3;
tt = 0 : 1/fs : dur; %time duration
f=1000; %frequency
vol= db2mag(1);
y=vol*sin(2*pi*f*tt);
soundsc( y, fs );
</pre><p>Where do I apply the dB? When I multiply it to the signal I do not notice a change. Say i increase it from 1 dB to 10, I still do not hear the difference.
Another issue, at certain frequencies my sound sounds extremely distorted such as at 20kHz and 30kHz. Why is this? And at certain higher frequencies my sound sounds like it is a lower frequency. For example, at 29kHz it sounds higher than 31kHz. I am fairly new to Matlab so help would be appreciated.</p>Sergio Camposhttps://www.mathworks.com/matlabcentral/profile/authors/7558751-sergio-campostag:www.mathworks.com,2005:Question/3131372016-11-20T15:19:42Z2016-12-07T13:06:33ZCustomising creation function in GA optimisation tool<p>Bus route network design problem aims to find an optimal set of routes that satisfies a predefined objective and a set of constraints. This is to be optimized using genetic algorithm. If an initial population of <b>N individuals</b> is to be formed from a set of routes stored as a cell array, is it possible to customize the genetic algorithm optimization tool in Matlab for this?</p>Harihttps://www.mathworks.com/matlabcentral/profile/authors/8933920-haritag:www.mathworks.com,2005:Question/3158102016-12-07T13:05:14Z2016-12-07T13:05:14ZMEX some Matlab included libraries not found on Windows<p>I have finally succeeded to install MinGW C/C++ Compiler (TDM-GCC 4.9.2) on a Windows x64 machine and I've been able to configure it manually.
I am trying to compile my code which has compiled without problems before (Matlab 2012a). The command line is</p><pre> call "C:\Program Files\MATLAB\R2012b\bin\mex.bat" -output mymexfile mymexcode.c .\asio\asio.cpp .\asio\asiodrivers.cpp .\asio\asiolist.cpp .\audio_io.cpp ole32.lib winmm.lib advapi32.lib user32.lib</pre><p>So I'm trying to include those four libraries (ole32.lib winmm.lib advapi32.lib user32.lib), which can all be found in</p><p><tt>c:\Program Files\MATLAB\R2016b\sys\lcc64\lcc64\lib64\</tt></p><p>I get those errors:</p><pre class="language-matlab">g++: error: ole32.lib: No such file or directory
g++: error: winmm.lib: No such file or directory
g++: error: advapi32.lib: No such file or directory
g++: error: user32.lib: No such file or directory
</pre><p>How do I make mex/gcc/g++ find those libraries?</p><p>Best regards</p>Pawel Gruszczynskihttps://www.mathworks.com/matlabcentral/profile/authors/63429-pawel-gruszczynskitag:www.mathworks.com,2005:Question/3157802016-12-07T09:34:52Z2016-12-07T13:03:29ZHow i can save in .XML<p>I have install soliworks 2016 student version, matlab r2016b student and simscape.
I have enter the code in matlab :
install_addon 'smlink.r2016b.win64.zip'
smlink_linksw
All is done, after i have actived the add-in Simscape Multibody Link in SolidWorks.
But i can't save file as .XML
If some can help me please</p>ALEXANDRE Cammaranohttps://www.mathworks.com/matlabcentral/profile/authors/9317889-alexandre-cammaranotag:www.mathworks.com,2005:Question/3158092016-12-07T13:01:24Z2016-12-07T13:01:24Zi want to load these files into a single code and then that averages them and saves them into a single column. i have managed it for a single text file however i am struggling with loading multiple text files at once. <p>all files are attached however there are 54 text files not 2 this is just to give an insight as to what the data looks like.</p><p>the first code performs the operations i want on the files and i need an extention to load multiple files at once into the said code. thanks in advance.</p><p>clear all
close all
clc</p><p>% Open file
fileID = fopen('test_4 ', 'r');
% First line of file
tline = fgetl(fileID);
% Loop parameters
test1 = [];
% Cycles through fgetl for the lines before data
while isempty(test1);
tline = fgetl(fileID);
D = textscan(tline,'%f');
test1 = D{1};
end;</p><p>% Define n for loop
n = 1;
% Number of uselss lines before data
filler = 82;
% Cycles through fgetl for the useless lines
while n < filler + 1;
disp(tline);
tline = fgetl(fileID);
n = n + 1;
end;</p><p>% Number of data points required from actual data
data_required = 466;
% Preallocation of size of data
data = zeros(data_required - 1, 9);
% Redefine n for loop
n = 1;
% Clcyes through fgetl until all required data is collected
while n < data_required;
disp(tline);
tline = fgetl(fileID);
% Saves data to cell array
C = textscan(tline,'%f');
% Saves data from cell to matrix
data(n,:) = C{1};
n = n + 1;
end;
% means the temperature values and omits the mean time
A = data;
mean(A);
M = mean (A);
M (:,1) = [];
M_column = transpose (M);</p><p>%corrects the error in the thermocouple readings from thermocouple 1 to 8
%corrects the error in the thermocouple readings from thermocouple 1 to 8
%corrects the error in the thermocouple readings from thermocouple 1 to 8
%corrects the error in the thermocouple readings from thermocouple 1 to 8</p><p>error = [2;13;17;8;20;21;9;8];
avg_correction = error + M_column</p><p>% saves the data into a single text file</p><p>save('average.txt','avg_correction','-ascii')</p>Martin Wonghttps://www.mathworks.com/matlabcentral/profile/authors/7076325-martin-wongtag:www.mathworks.com,2005:Question/3158082016-12-07T12:56:07Z2016-12-07T12:57:41Z Can any other model of neural network be used instead of CNN (Convolutional Neural Network) to transfer learning?<p>I have been watching the following webinar on machine learning.</p><p>https://www.mathworks.com/videos/object-recognition-deep-learning-and-machine-learning-for-computer-vision-121144.html?form_seq=conf546&elqsid=1477129844137&potential_use=Student&country_code=BD</p><p>Here, we have classified objects by their images with the help oh machine learning capability of MATLAB. Then the learning is transferred to CNN for identifying the same set of images but using the machine learning as a feature of the neural network. My question is is there any way to use other models of neural networks instead of CNN to transfer learning? If yes then which model?</p>Noor Naziahttps://www.mathworks.com/matlabcentral/profile/authors/7781163-noor-naziatag:www.mathworks.com,2005:Question/3158062016-12-07T12:38:47Z2016-12-07T12:42:53Z error by using gmminit function:<p>i am trying to use gmminit function with netlab in matlab .but always got this error:
do you have an idee?
thank alot
Error using internal.stats.parseArgs (line 42)
Wrong number of arguments.</p><pre class="language-matlab">Error in kmeans (line 174)
= internal.stats.parseArgs(pnames, dflts, varargin{:});
</pre><pre class="language-matlab">Error in gmminit (line 36)
[mix.centres, options, post] = kmeans(mix.centres, x, options);
</pre><p>code:</p><pre class="language-matlab">options=foptions; %erzeugt den Optionsvektor (1x18)
options(1) = 1; %Fehler anzeigen
options(14) = 20; %Anzahl der Iterationen (Trainingszyklen)
mix = gmm(2, 5, 'full'); %Erstellung eines Gauss’schen Mischmodells mit 2
Dimensionen, 5 Normalverteilungen und dem Typ ‘full’
mixiclass1=gmminit(mix,class1', options); %vortrainieren mit Klasse 1
mixiclass2=gmminit(mix,class2', options); %vortrainieren mit Klasse 2
</pre>azade Nassirianhttps://www.mathworks.com/matlabcentral/profile/authors/9331134-azade-nassiriantag:www.mathworks.com,2005:Question/3152152016-12-03T07:26:59Z2016-12-07T12:38:33ZMy question is regarding classifying the images based on the whichever color is present more in the given image after converting the color image into gray and finding its histogram.<pre class="language-matlab">clc;
Image = imread('rose.jpg');
figure
imshow(Image);
I=rgb2gray(Image);
figure
imshow(I)
[count,x] = imhist(I)
index1 = find(x == 67);
index2 = find(x == 100);
numPixels = sum(count(index1:index2))
</pre><p>This code worked well up to finding the sum of number of pixels from one intensity range to other.</p><p>Now I am having few images. Some of them have red pixels in large amounts,some have white, some have blue, etc. I have to classify these images as blue, white, red, etc. after finding histogram and counting pixels in certain range. How can I do that?</p><p>Or is there any other way to do this classification?</p>snehal jaipurkarhttps://www.mathworks.com/matlabcentral/profile/authors/9045684-snehal-jaipurkartag:www.mathworks.com,2005:Question/3158052016-12-07T12:38:25Z2016-12-07T12:38:25ZFilfilt.m and FIR error message<p>I have an EEG .txt data file with 372000 columns and 128 rows, to 4 precision points. I need to load one row at a time and check the spectrum for each channel/row and if it detects > 5dB periodic 50 Hz noise it filters that channel and only that channel. I know I should use notch filter and I have gotten so far (but it does not function):</p><p>b1 = fir1(4,[0.4 0.43],'stop');
b2 = fir1(4,[0.01 0.99],'bandpass');
E1 = filtfilt(b1,1,double(EEG));
E = filtfilt(b2,1,E1);
fspec = fdesign.notch('N,F0,Q,Ap',6,0.1,10,5);
d = design(fspec,'FIR');
Ntchd = filter(d,E1);</p><p>Error message:</p><p>Error using fdesign.abstracttype/superdesign (line 95)
There are no FIR designs for specification type: 'N,F0,Q,Ap'.</p><p>Error in fdesign.abstracttype/design (line 13)
varargout{1} = superdesign(this, varargin{:});</p><p>Error in EEG_filter (line 52)
d = design(fspec,'FIR');</p>Emoke Ipkovichhttps://www.mathworks.com/matlabcentral/profile/authors/8884624-emoke-ipkovichtag:www.mathworks.com,2005:Question/3157972016-12-07T11:38:09Z2016-12-07T12:24:09ZWhy am I getting images that are less exposed than they should be based on my settings?<p>I am using a camera with an external trigger that captures images on a rising edge and grabbing a frame in MATLAB (start(im); data = getdata(im,1); stop(im);); however, this image is slightly darker than what I get when taking the image with my camera's software or when simply doing a preview in MATLAB and then acquiring images (start(im); data = getdata(im,1); stop(im);). The exposure, shutter, etc. are all set to manual modes with a specific value (src = getselectedsource(im); src.Exposure = ...). Can anyone help? Thank you.</p>Mikehttps://www.mathworks.com/matlabcentral/profile/authors/5552499-miketag:www.mathworks.com,2005:Question/3158022016-12-07T12:15:18Z2016-12-07T12:15:18Z(Convolutional Neural Network) - Why is the "Mini-batch Accuracy" either 0% or 100%, when I set 'Shuffle' to 'never' in the trainingOptions()<p>Hello everyone,
currently I am working on a convolutional neural network for a project at university and I've encountered a behavior of Matlab that I cannot explain.
When I set the training option 'Shuffle' to 'never' the 'Mini-Batch-Accuracy' is either 0% or 100%, although the imageDatastore object I am working with is already shuffled.
However, if I set 'Shuffle' to 'once', the 'Mini-Batch-Accuracy' will vary as expected.
The 'Training Accuracy' in the traininfo-object returned by the trainNetwork()-function, shows a few more different values, but not as much as the returned traininfo-object, when 'Shuffle' is set to 'once'.</p><p>What could be the reason for this? Or is it simply a bug? Any Ideas?</p><p>Thank you in advance for your help.</p>Patrickhttps://www.mathworks.com/matlabcentral/profile/authors/7012822-patrick