https://fr.mathworks.com/matlabcentral/answers/questions.atomMATLAB Answers — New Questions2017-08-23T23:11:28Ztag:fr.mathworks.com,2005:Question/1014522009-06-27T01:11:00Z2017-08-23T23:11:28ZWhy am I unable to disable font antialiasing in Linux with Gnome in MATLAB 7.5 (R2007b) ?<p>It turns out that Gnome differs from other Linux window managers in that it makes Java aware of the system antialiasing settings. As a result, Java picks this up automatically and behaves as it does on Windows, which is to say, the application obeys the system setting.</p><p>However, other Linux window managers do not supply Java with the antialiasing, which is why the checkbox exists, so that you can manually turn on antialiasing.</p><p>So on Gnome, the behavior is as follows:</p><pre> Gnome setting MATLAB setting MATLAB result</pre><pre> ------------------------------------------------------------</pre><pre> Monochrome (No AA) No AA No AA</pre><pre> Monochrome (No AA) AA AA</pre><pre> LCD AA No AA AA</pre><pre> LCD AA AA AA</pre>MathWorks Support Teamhttps://fr.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:fr.mathworks.com,2005:Question/3538482017-08-23T23:11:09Z2017-08-23T23:11:09Zデジタルフィルタのボード線図<p>デジタルフィルタモデルのボード線図をM-ファイルで記述したコマンドで求めたい。
周波数はHzとしたい。
合わせてExcelでも描画するために、freq.dat、gain.dat、phase.datデータを発生したい。</p>Isao Okadahttps://fr.mathworks.com/matlabcentral/profile/authors/2000296-isao-okadatag:fr.mathworks.com,2005:Question/3538292017-08-23T19:03:30Z2017-08-23T23:03:19ZHow to implement cross validation in neutral network for time series prediction<p>I am using k fold cross validation for the training neural network in order to predict a time series. I have an input time series and I am using Nonlinear Autoregressive Tool for time series. I am using 10 fold cross validation method and divide the data set as 70 % training, 15% validation and 15 % testing. But I really din't know how to generate the code.</p><p>And please to be honest, this is the first time that I am using neural networks. So, please be humble in your explanation!!</p><p>This is something that I wrote,</p><pre class="language-matlab">k=10;
Indices=crossvalind('Kfold', length(X), 10);
X = tonndata(densig,true,false);
T = tonndata(densig,true,false);
trainFcn = 'trainlm';
inputDelays = 1:2;
feedbackDelays = 1:2;
hiddenLayerSize = [50 20 20];
X1=cell2mat(X);
T1=cell2mat(T);
for i=1:k
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize,'open',trainFcn);
X1(i)=find(X1(Indices(i)));
T1(i)=find(T1(Indices(i)));
[x,xi,ai,t] = preparets(net,X1,{},T1);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 5000;
[net,tr] = train(net,x,t,xi,ai);
end
y = net(x,xi,ai);
e = gsubtract(t,y);
performance = perform(net,t,y);
</pre><p>Please help</p><p>Thanks
Baqar</p>Baqar Rizvihttps://fr.mathworks.com/matlabcentral/profile/authors/10300359-baqar-rizvitag:fr.mathworks.com,2005:Question/3538472017-08-23T22:48:41Z2017-08-23T22:55:03ZProblems finding exact match for a string<p>Hello,</p><p>I would like to match a string in a list of other strings (cell array). My problem is that in using regexpi or regexp, it misidentifies the location of the string if it finds it as a substring. For example</p><p>GN= {‘EC2020’};
In looking at a cell array of strings, GN will be found in the string ‘EC2020.1’</p><p>I do not want it to match with this expression because this is string stands for something different. I simply want to exact match EC2020 without including EC2020.1 as a hit.
Some more details of this is example:</p><pre> GN = {'EC2020'};
List = {'EC1919'; 'EC2020'; 'EC2020.1'};
dList = length(List(:,1));
pds = cell(1,dL); </pre><pre> j = 1;</pre><pre> for i = 1:dList</pre><pre> c = find(~cellfun(@isempty,regexpi(List(i,:),GN))); </pre><pre> if ~isempty(c) </pre><pre> pds(j)= List(i,1);
j = j + 1;
end
end</pre><p>Any help would be greatly appreciated!</p>J Mhttps://fr.mathworks.com/matlabcentral/profile/authors/10381221-j-mtag:fr.mathworks.com,2005:Question/3538442017-08-23T21:19:19Z2017-08-23T22:40:28Zfinding circles and tracking<p>hello
I am new to MATLAB and I faced this problem as a university project
I have to find circles the original image had really poor lighting I got this result after pre processing.
now I have problem detecting circles and tracking them.its a stack (.tif) 200 images and particles have a different location in each image.
is there any code out there or any algorithm can help me in this project?</p>sanaz hajjamihttps://fr.mathworks.com/matlabcentral/profile/authors/5079738-sanaz-hajjamitag:fr.mathworks.com,2005:Question/3538402017-08-23T20:21:36Z2017-08-23T22:35:47ZSubscripted assignment dimension mismatch.<pre class="language-matlab">%% Simple Face Recognition Example
% Copyright 2014-2015 The MathWorks, Inc.
%% Load Image Information from ATT Face Database Directory
faceDatabase = imageSet('ATTFaces','recursive');
</pre><pre> %% Display Montage of First Face
figure;</pre><pre> % (faceDatabase(1) means pull out all images belong to folder 1
montage(faceDatabase(1).ImageLocation);
title('Images of a Single Face');</pre><pre> %% Display Query Image and Database Side-Side</pre><pre> personToQuery = 1; % Call the a set of images at position 1</pre><pre> galleryImage = read(faceDatabase(personToQuery),1);
figure;
for i=1:size(faceDatabase,2)
imageList(i) = faceDatabase(i).ImageLocation(5);
end
subplot(1,2,1);
imshow(galleryImage);
subplot(1,2,2);
montage(imageList);
diff = zeros(1,9);</pre><pre> %% Split Database into Training & Test Sets in the ration 80% to 20%
[training,test] = partition(faceDatabase,[0.8 0.2]);</pre><pre> %% Extract and display Histogram of Oriented Gradient Features for single face
person = 1;
[hogFeature, visualization]= ...
extractHOGFeatures(read(training(person),1));
figure;
subplot(2,1,1);imshow(read(training(person),1));title('Input Face');
subplot(2,1,2);plot(visualization);title('HoG Feature');</pre><pre> %% Extract HOG Features for training set
trainingFeatures = zeros(size(training,2)*training(1).Count,4680);</pre><pre> featureCount = 1;
for i=1:size(training,2)
for j = 1:training(i).Count
trainingFeatures(featureCount,:) = extractHOGFeatures(read(training(i),j));
trainingLabel{featureCount} = training(i).Description;
featureCount = featureCount + 1;
end
personIndex{i} = training(i).Description;
end</pre><pre> %% Create 40 class classifier using fitcecoc
faceClassifier = fitcecoc(trainingFeatures,trainingLabel);</pre><pre> %% Test Images from Test Set
person = 2;
queryImage = read(test(person),1);
queryFeatures = extractHOGFeatures(queryImage);
personLabel = predict(faceClassifier,queryFeatures);
% Map back to training set to find identity
booleanIndex = strcmp(personLabel, personIndex);
integerIndex = find(booleanIndex);
subplot(1,2,1);imshow(queryImage);title('Query Face');
subplot(1,2,2);imshow(read(training(integerIndex),1));title('Matched Class');</pre><pre> %% Test First 5 People from Test Set
figure;
figureNum = 1;
for person=1:5
for j = 1:test(person).Count
queryImage = read(test(person),j);
queryFeatures = extractHOGFeatures(queryImage);
personLabel = predict(faceClassifier,queryFeatures);
% Map back to training set to find identity
booleanIndex = strcmp(personLabel, personIndex);
integerIndex = find(booleanIndex);
subplot(2,2,figureNum);imshow(imresize(queryImage,3));title('Query Face');
subplot(2,2,figureNum+1);imshow(imresize(read(training(integerIndex),1),3));title('Matched Class');
figureNum = figureNum+2;</pre><pre> end
figure;
figureNum = 1;</pre><pre class="language-matlab">end
</pre><p>Hello guys,</p><p>I found this tutorial on youtube that uses hog features for face recognition on MATLAB. I am playing around with it cause i am doing similar things for my dissertation. In this one when i run it as it is with the ATTFaces dataset (contains 10 images for each individual, 40 in total in .pgm format) it works fine. When i try to change the dataset, using the YALE faces, or a custom dataset i have my personal images i get this mismatch error that you can see in the title. The other datasets have images in .jpg by the way and are more that 10 per folder. Can someone help me and tell me why i get this error? I gave you information about the format of the images and thier size. Also the number of them in the folders. Maybe one of these parameters makes it fail. If yes, which one.</p><p>Regards to everyone :)</p>Dimitrios Kampolishttps://fr.mathworks.com/matlabcentral/profile/authors/10262104-dimitrios-kampolistag:fr.mathworks.com,2005:Question/3179812016-12-23T12:07:28Z2017-08-23T22:31:32ZFitting a uitable to a subplot<p>Hi.
I want to programatically add a uitable to a subplot position (without using guide). Whilst I have been able to do this, Im not able to fill the subplot region. Is it possible to do this (at least in the horizontal dimension)</p><img src = "/matlabcentral/answers/uploaded_files/66142/im102.png"><p>This is my code:</p><pre class="language-matlab">% create the data
% Create the column and row names in cell arrays
cnames = {'Z','FMc','FMc','AvgI'};
rnames = {'1','2','3','4','5','6','7','8'};
% Create the uitable
t = uitable(f1,'Data',data,...
'ColumnName',cnames,...
'RowName',rnames,...
'ColumnWidth',{50});
subplot(1,2,2),plot(3)
pos = get(subplot(1,2,2),'position');
delete(subplot(1,2,2))
set(t,'units','normalized')
set(t,'position',pos)
</pre><p>I was wondering if the ColumnWidth variable could somehow be calculated from the subplot width?</p>Jasonhttps://fr.mathworks.com/matlabcentral/profile/authors/1217570-jasontag:fr.mathworks.com,2005:Question/3243022017-02-10T05:59:02Z2017-08-23T22:29:14ZRunning Two Scripts at the Same Time<p>I am programming an open source board with the Arduino toolbox on Matlab. I have one script for a buzzer and another one for a light and I want to run them simultaneously so I can get the light and buzzer to respond at the same time. Is there a way I can do this using the Parallel Computing Toolbox?</p><p>Both scripts are for loops that do not have any inputs or outputs</p>minmihttps://fr.mathworks.com/matlabcentral/profile/authors/8686941-minmitag:fr.mathworks.com,2005:Question/3537652017-08-23T11:42:40Z2017-08-23T22:23:28ZHow to plot a surface from x and y having different values of z, i.e. (x,z1) and (y,z2)?<p>Hi,
I am trying to draw a surface from two sets of results, set A and set B. Each set has two columns, column 1 and column 2. I would like to plot a surface from these two sets, such that column 2 in each set is the z axis, while columns 1 in sets A and B are x and y axes, respectively.</p><p>I have attached herewith the sets of data for your kind reference.</p><p>Thank you.</p>Ismail Qeshtahttps://fr.mathworks.com/matlabcentral/profile/authors/10292327-ismail-qeshtatag:fr.mathworks.com,2005:Question/3538452017-08-23T21:33:51Z2017-08-23T22:23:12ZWhat is the best way to create a 10x11 matrix from a 2x100 <p>First column of the 2X100 matrix is a sequence of 10 numbers repeating 10 times.
The final matrix required is a 10x11 matrix where first column is the sequence of the 10 numbers that repeat, the remaining 10 columns are the respective numbers from the 2nd column of the original 2x100 matrix</p>Chockalingam Kumarhttps://fr.mathworks.com/matlabcentral/profile/authors/3324273-chockalingam-kumartag:fr.mathworks.com,2005:Question/3537522017-08-23T10:13:49Z2017-08-23T22:21:42ZHelp trying to create a Bean Machine Random Walk script<p>I'm creating this script which simulates 120 particles falling one by one down a 100x100 grid. Particles should stop when they either collide with the edges of the plot or collide with older particles.
I've managed to get a single particle to fall and stop when it hits the edges, however I'm stuck trying now to repeat this for 120 particles.</p><p>Can anyone see why the particles don't stop when they reach the bottom?</p><pre> %% Initialisation
clear all
M = 120; % the number of particles
N = 400; % the number of jumps to take
Stepx = 1; % the size of the jumps in x
Stepy = 1; % the size of the jumps in y</pre><pre> e = 1/3;
s = 1/3;
w = 1/3;</pre><pre> x = zeros(N,M); % set all x positions to zero initially
y = zeros(N,M); % set all y positions to zero initially
%% Simulation</pre><pre> for n = 1:N % for each of the N jumps
if y(n+1,M) ~= -100 || x(n+1,M) ~=-50 || x(n+1) ~= 50
r = rand(1, M); </pre><pre> east_mask = r <= e;
x(n+1, east_mask) = x(n, east_mask) + Stepx;
y(n+1, east_mask) = y(n, east_mask);</pre><pre> south_mask = r >= e & r <= e + s;
x(n+1, south_mask)= x(n, south_mask);
y(n+1, south_mask)= y(n, south_mask)- Stepy; </pre><pre> west_mask = r>= e + s & r <=1;
x(n+1, west_mask) = x(n, west_mask) - Stepx;
y(n+1, west_mask) = y(n, west_mask);
else
break
hold on
end
plot(x(n,:), y(n,:), '.', 'MarkerSize', 20)
axis equal
axis([-50, 50, -100, 0]);
drawnow
end</pre>Joshua Mullerhttps://fr.mathworks.com/matlabcentral/profile/authors/10770191-joshua-mullertag:fr.mathworks.com,2005:Question/3538462017-08-23T22:02:02Z2017-08-23T22:02:02ZSolve an equation of 3 unknowns <p>Dear all,</p><p>I have the following equation:</p><pre> z = k2/2 * (k1 / k3)
w = sqrt(k1 * k3)
eqn1 = 1/(-z * w) * log(sqrt(1 - z^2)) + log(2)/(z * w) * A - t</pre><p>with A and t being column vectors with same length.</p><p>How is it possible to calculate k1, k2, k3?</p><p>Thank you!</p>Stergios Verroshttps://fr.mathworks.com/matlabcentral/profile/authors/5971694-stergios-verrostag:fr.mathworks.com,2005:Question/3536102017-08-22T10:14:51Z2017-08-23T21:42:06ZI want to draw an implicit form 2-D function.<p>Hello, I want to draw an implicit form 2-D function.</p><p>I can draw other functions like x^2+y^2=4 or x^6+y^6=10000 by using 'ezplot'.</p><p>Below is the code.</p><pre class="language-matlab">ezplot('x^6+y^6-10000 = 0', [-10 10 -10 10] );
</pre><p>But, when I try to draw</p><pre> '0.97*x^6-280.2*x^5+2.9*x^4*y^2-104.38*x^4*y+16060.71*x^4-560.39*x^3*y^2+18788.73*x^3*y+1345683.35*x^3+2.9*x^2*y^4-208.76*x^2*y^3+26602.2*x^2*y^2+210504.82*x^2*y-42416013.17*x^2-280.2*x*y^4+18788.73*x*y^3+121852*x*y^2+13934841.45*x*y-419850783.65*x+0.97*y^6-104.38*y^5+3742.43*y^4-52190.91*y^3+17767421.39*y^2+313145477.65*y = -16025102903.66'</pre><p>there comes an error 'index exceeds matrix dimensions'</p><p>To figure out the reason, I tried with simpler functions.</p><p>1)</p><pre class="language-matlab">ezplot('x^6+y^6+x^5+y^5+x^4+y^4+x^3+y^3+x^2+y^2+x+y+x^5*y+x^4*y^2+x^3*y^3+x^2*y^4+y^6-1000000 = 0', [-10 10 -10 10] );
</pre><p>: The curve is drawn exactly.</p><p>2)</p><pre class="language-matlab">ezplot('x^6+y^6+x^5+y^5+x^4+y^4+x^3+y^3+x^2+y^2+x+y+x^5*y+x^4*y^2+x^3*y^3+x^2*y^4+y^6-100000000 = 0', [-10 10 -10 10] );
</pre><p>: If the constant number of 1)'s function 1000000 is changed to a larger number like 1000000000</p><p>There comes a same error message 'index exceeds matrix dimensions'.</p><p>How can I fix this problem?</p><p>Thanks</p>Hosung Parkhttps://fr.mathworks.com/matlabcentral/profile/authors/9713708-hosung-parktag:fr.mathworks.com,2005:Question/3530132017-08-16T22:08:24Z2017-08-23T21:41:18ZIn 2017a, How do I prevent a legend item from being 'greyed out' when the plot line is set with visibility off?<p>With 2017a, my legend entries are showing up as 'greyed out' when the plot object is set with visibility off. This is not the behavior for R2015b (and previous releases).</p><p>This example code shows the legend differently in R12015b vs. R2017a. I want the R2015b behavior. I frequently use this approach when I want the legend to be in one order, but the plotting order to be different.</p><pre class="language-matlab">%% Example of greyed out legend.
% allows order of legend to be different from plotting order
% 2015b: all legend entries are normal color
% 2017a: 1st legend entry has gray text and the plot line/symbol is greyed
</pre><pre class="language-matlab">figure
legstr = {};
hold all;
</pre><pre class="language-matlab">plot(0,0,'ro-','Visible','off')
legstr(end+1) = {'Line'};
</pre><pre class="language-matlab">plot(1:100,randn(1,100),'ks-')
legstr(end+1) = {'Random'};
</pre><pre class="language-matlab">plot([1 100],[0.5 0.5],'ro-')
</pre><pre class="language-matlab">lh=legend(legstr);
</pre><p>I'd prefer a solution that doesn't require rewriting 100's of lines of existing code, like a property setting in the legend command.</p><p>Thanks</p>Karenhttps://fr.mathworks.com/matlabcentral/profile/authors/1319481-karentag:fr.mathworks.com,2005:Question/3419782017-05-25T21:18:57Z2017-08-23T21:26:20ZError using VideoReader/init (line 619)<p>When I run the command</p><pre class="language-matlab">v = VideoReader('xylophone.mp4');
</pre><p>I get the following error:</p><pre class="language-matlab">Error using VideoReader/init (line 619)
The VideoReader plugin libmwgstreamerplugin failed to load properly.
</pre><pre class="language-matlab">Error in VideoReader (line 172)
obj.init(fileName);
</pre><p>Doing some search for a solution I came across <a href = "http://www.mathworks.com/support/bugreports/1246784">http://www.mathworks.com/support/bugreports/1246784</a>. However, this bug was supposed to be fixed in R2016b. I am currently running R2017a. The MATLAB version of the stdc++ library is libstdc++.so.6.0.20 and the OS version is libstdc++.so.6.0.19.</p><p>Can you please help troubleshoot?</p>Paul Hodorhttps://fr.mathworks.com/matlabcentral/profile/authors/9484709-paul-hodortag:fr.mathworks.com,2005:Question/3538082017-08-23T16:26:30Z2017-08-23T21:18:57ZHow do I install an annual subscription licenses?<p>Now that Matlab is phasing out the perpetual named user licenses and replacing with annual subscriptions, what is the license installation procedure for those? Do they just get appended to license.dat and no entry in mlm.opt?</p>Denise Richardshttps://fr.mathworks.com/matlabcentral/profile/authors/8325647-denise-richardstag:fr.mathworks.com,2005:Question/3538372017-08-23T20:15:17Z2017-08-23T21:13:42ZWhy dont appear my variables and functions in the workspace?<p>Hi every one,</p><p>Im doing the Rosenbrock function in matlab and when i run my code, it send my just my answer in the workspace and with other functions dont appear anything. Please help. This is the code (Where just appear the answer in the workspace and i need to see the function(f), grad (g), x, niter, D(iter) that is where i look what happen, and other variables):</p><pre class="language-matlab">function [xopt,fopt,niter,gnorm,dx] = graddescent(varargin)
</pre><pre class="language-matlab">if nargin==0
% define starting point
x0 = [-1;1];
elseif nargin==1
% if a single input argument is provided, it is a user-defined starting
% point.
x0 = varargin{1};
else
error('Incorrect number of input arguments.')
end
</pre><pre class="language-matlab">% termination tolerance
tol = 1e-6;
</pre><pre class="language-matlab">% maximum number of allowed iterations
maxiter = 100;
</pre><pre class="language-matlab">% minimum allowed perturbation
dxmin = 1e-6;
</pre><pre class="language-matlab">% step size ( 0.33 causes instability, 0.2 quite accurate)
alpha = 0.001
</pre><pre class="language-matlab">% initialize gradient norm, optimization vector, iteration counter, perturbation
gnorm = inf; x = x0; niter = 0; dx = inf;
</pre><pre class="language-matlab">% define the objective function:
f = @(x1,x2) 100*(x2-x1.^2).^2+(1-x1).^2
</pre><pre class="language-matlab">% define the gradient of the objective
</pre><pre class="language-matlab">grad ={@(x1,x2) -400*x1.*(x2-x1.^2)^2-2*(1-x1)
@(x1,x2) 200*(x2-x1.^2)};
</pre><pre class="language-matlab">% plot objective function contours for visualization:
figure(1); clf; ezcontour(f,[-5 5 -5 5]); axis equal; hold on
</pre><pre class="language-matlab">% redefine objective function syntax for use with optimization:
f2 = @(x) f(x(1),x(2));
</pre><pre class="language-matlab">% gradient descent algorithm:
while and(gnorm>=tol, and(niter <= maxiter, dx >= dxmin))
% calculate gradient:
g = [grad{1}(x(1,1),x(2,1))
grad{2}(x(1,1),x(2,1))]
gnorm = norm(g);
% take step:
</pre><pre> xnew= x-alpha*g
% check step
if ~isfinite(xnew)
display(['Number of iterations: ' num2str(niter)])
error('x is inf or NaN')
end
% plot current point
plot([x(1) xnew(1)],[x(2) xnew(2)],'ko-')
refresh
% update termination metrics
niter = niter + 1
dx = norm(xnew-x);
x = xnew;</pre><pre> D(niter,:)={niter,xnew,g,alpha}</pre><pre class="language-matlab">end
xopt = x;
fopt = f2(xopt);
niter = niter - 1
</pre>Camilo Rojashttps://fr.mathworks.com/matlabcentral/profile/authors/10718732-camilo-rojastag:fr.mathworks.com,2005:Question/2643832016-01-19T20:30:22Z2017-08-23T21:11:28Zconvert categorical to numeric<p>I have a categorical array and I want to convert it back to the numerical matrix.
What is the syntax?</p><p>Thanks,</p>Fischer Zhenghttps://fr.mathworks.com/matlabcentral/profile/authors/6853873-fischer-zhengtag:fr.mathworks.com,2005:Question/3538062017-08-23T16:11:50Z2017-08-23T21:10:04ZReading a scrambled Raw binary data in matlab<p>Hello I am doing a project using <b>ADI's famcomms5</b>, so I transmitted and received a file which I then saved into a binary file using <b>GNU Radio</b>'s file sink. Now this is a binary file, if I open this file in GNU Radio I can see the different wave responses but when I import the file into matlab it shows scrambled symbolic data which I am not able to read or work on further. Is there anyway I can read this data? I used <b>fopen</b> function but its not much of help.</p><p>In images there are some snippets of the form of data I see in Matlab.</p><p>Apreciate any help, Thank you very much.
Regards
Imran Habib</p><img src = "/matlabcentral/answers/uploaded_files/86220/2.png"><img src = "/matlabcentral/answers/uploaded_files/86221/3.png"><img src = "/matlabcentral/answers/uploaded_files/86222/1.png">Imran Habibhttps://fr.mathworks.com/matlabcentral/profile/authors/9118896-imran-habibtag:fr.mathworks.com,2005:Question/3509572017-07-31T14:08:39Z2017-08-23T21:09:54ZIs it possible to have some form of licence for custom toolboxes?<p>I have created a toolbox which will be distributes to our customers. I was wondering if there is an option to have a node-locked licence (or similar) for it to prevent unauthorised use.</p>Sunny Talekarhttps://fr.mathworks.com/matlabcentral/profile/authors/10193291-sunny-talekartag:fr.mathworks.com,2005:Question/3538422017-08-23T20:47:42Z2017-08-23T21:09:19ZLoading a pre-running function into a static Text Box.<p>Hey Guys. Really new to MATLAB. I have been trolling through pages and pages of comments and threads trying to find out. Basically, I have a large function (A.m) running which at one point calls another function (B.m). Now B.m keeps track of the progress of A.m. I want to print B.m into a static text box of a GUI made in GUIDE. I can't think of a way to do this. Please help. I'm about to throw my computer out the window.</p>Lee Parkerhttps://fr.mathworks.com/matlabcentral/profile/authors/10525436-lee-parkertag:fr.mathworks.com,2005:Question/3538362017-08-23T20:11:07Z2017-08-23T21:08:21ZText Output of m file<p>I'm publishing an m file and want to print out the contents of another m file within the one I'm publishing I remember having done this before but I can't remember how.</p><p>Thanks</p>Kambren Rowlanhttps://fr.mathworks.com/matlabcentral/profile/authors/9504471-kambren-rowlantag:fr.mathworks.com,2005:Question/3180252016-12-23T20:34:54Z2017-08-23T21:04:10ZMerging .mat files into 1 file, only containing variables in array form<p>Hi there,</p><p>I want to merge 5 .mat files into 1 .mat file. When doing this, the end result is a mat file which contains 1 structure array. I want the result to be a mat file that only contains matrix arrays.</p><p>The situation is follows:</p><p>- Each mat file contains 11 variables (with the same name), and each variable contains 136000x1 samples.</p><p>- The end result should be 1 mat file that contains the 11 variables, but with 136000x5 samples.</p>Hinemtherhttps://fr.mathworks.com/matlabcentral/profile/authors/5884637-hinemthertag:fr.mathworks.com,2005:Question/3538012017-08-23T15:54:52Z2017-08-23T20:59:58Zdividerand application in neural<p>suppose i want to divide fisheriris data into training,validation,testing how to do it
when i use dividerand command it does not take fisheiris as input.</p>Atharv Telanghttps://fr.mathworks.com/matlabcentral/profile/authors/10721972-atharv-telangtag:fr.mathworks.com,2005:Question/3538432017-08-23T20:57:34Z2017-08-23T20:57:34ZHow to solve boundary condition with ordinary differential in PDEPE<p>How can I couple the ODE for boundary condition in PDE?
Now I have one very simple PDE function - diffusion equation.</p><p>dt*dC(t,x)=D*dC^2(t,x)/dx^2</p><p>But with a complicated boundary condition</p><p>C(0,t)/dt=alpha*C(0)</p><p>C（1,t）/dt=alpha*C(1)</p><p>My question is how can I couple this ODE B.C. in PDEPE solver.</p><p>I am a MatLab beginner. Please provide me any suggestion that I can try.</p><p>Thank you very much!</p>Yirui Chenhttps://fr.mathworks.com/matlabcentral/profile/authors/10774698-yirui-chentag:fr.mathworks.com,2005:Question/979112013-03-28T12:42:00Z2017-08-23T20:56:36ZHow do I update my MATLAB trial license?<p>My MATLAB trial license has been extended but the MATLAB command window is still showing me the old expiration date. How can I update the trial license file?</p>MathWorks Support Teamhttps://fr.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:fr.mathworks.com,2005:Question/3538262017-08-23T18:48:25Z2017-08-23T20:55:59Zafter downloading the trail software its asking for the activation key ,where will i get this ? <p>how do i get the activation key?</p>Hifsa Fathimahttps://fr.mathworks.com/matlabcentral/profile/authors/10075658-hifsa-fathimatag:fr.mathworks.com,2005:Question/3538142017-08-23T17:01:34Z2017-08-23T20:54:00ZProblems in the PKEPLER function in the MATLAB astrodynamics software package.<p>The PKEPLER function is accepting values for radius only within the range of 0 to 1000. Ideally, the program should accept calls more than 6400 (radius of Earth). If these proper values are entered it displays that the rem function does not accept input because it is in the form of imaginary numbers. When values less than 1000 are given, the velocity is displayed as an complex number. Pls help solve</p>Aswath Suryahttps://fr.mathworks.com/matlabcentral/profile/authors/10715003-aswath-suryatag:fr.mathworks.com,2005:Question/3536972017-08-22T21:19:03Z2017-08-23T20:51:40ZAre there any codes to generate planar graphs in matlab or are there any large collections of planar graphs in matlab?<p>Are there any codes to generate planar graphs in matlab or are there any large collections of planar graphs in matlab? When posting codes if it's not obvious how to use the code to generate planar graphs an explanation would be helpful.
(This is an modification to a previous question I posted)</p>Hao Sunhttps://fr.mathworks.com/matlabcentral/profile/authors/3855756-hao-suntag:fr.mathworks.com,2005:Question/3538242017-08-23T18:17:41Z2017-08-23T20:43:32ZWrite a program to calculate the sum 1+2+3+...+300. Display the total after every 20 terms and by using an if statement to check if the current number of terms is a multiple of 20. The basic idea is this: if i/20 == ro<p>Write a program to calculate the sum 1+2+3+...+300. Display the total after every 20 terms and by using an if statement to check if the current number of terms is a multiple of 20. The basic idea is this: if i/20 == round(i/20), print the sum.</p>Mohammad Asadhttps://fr.mathworks.com/matlabcentral/profile/authors/10773647-mohammad-asadtag:fr.mathworks.com,2005:Question/3538212017-08-23T17:48:01Z2017-08-23T20:42:24ZHow to plot Error function of complex numbers<img src = "/matlabcentral/answers/uploaded_files/86235/unnamed.png"><p>Dear sir how have plotted for complex function taking omega=pi/2, M=0.5</p>HAREKRISHNA MANDALhttps://fr.mathworks.com/matlabcentral/profile/authors/4920149-harekrishna-mandaltag:fr.mathworks.com,2005:Question/3532712017-08-18T18:21:51Z2017-08-23T20:40:14ZGenpath is excluding package folders<p>Hello,</p><p>I am writing a script that requires to know every folder and subfolder, for which genpath() works perfectly.</p><p>However, there are a few folders that are packages (and begin with a '+'), and genpath ignores those.</p><p>Is it possible to have genpath include those, or some other way to automatically include that?</p><p>Thanks!</p>Matthew Brownhttps://fr.mathworks.com/matlabcentral/profile/authors/10621554-matthew-browntag:fr.mathworks.com,2005:Question/3242472017-02-09T20:18:17Z2017-08-23T20:30:36ZHow to access thermo demo?<p>I keep trying to access the thermo demo and I am unable to. I have been told i simply need to type thermo in the matlab command window and that it will initiate a simulink thermo demo. Is there something I am missing? This is the error I keep getting:</p><p>>> thermo</p><p>Undefined function or variable 'thermo'.</p>Franciscohttps://fr.mathworks.com/matlabcentral/profile/authors/9696898-franciscotag:fr.mathworks.com,2005:Question/3538352017-08-23T20:07:08Z2017-08-23T20:29:15ZHow to form objective function with a class instance and a set of variables<p>Hi,</p><p>I am trying to minimize an objective function by using fmincon(fun,x0,A,b,Aeq,beq,lb,ub).
But I am having some difficulties forming the objective function fun. The fun I defined has two inputs,
one is an instance of a class I defined (Myclass), another input is the array of independent variable X.
In the function, I plug in X into the Myclass instance's method.
But I got this error:
Struct contents reference from a non-struct array object.</p><p>I know that fun can take only one input; but in the fun, I need the other input parm to calculate.
How to solve this problem?</p><p>Thank you very much for any help.</p><p>Jennifer</p>JFzhttps://fr.mathworks.com/matlabcentral/profile/authors/6201072-jfztag:fr.mathworks.com,2005:Question/3529972017-08-16T19:19:36Z2017-08-23T20:26:15ZHow to find analytic expression for B-spline curve<p>Suppose I have a set of points (x,y), I can use</p><p>sp=spap2(3,4,x,y);</p><p>to fit a smooth curve to my data, and that curve consists of 3 cubic polynomials joined at knots. Now the output of this gives 6 coefficients. I originally thought I ought to have 12 coefficients for the 3 cubic polynomials.</p><p>Q1: Why are there 6 and not 12? Is this because of conditions on the functions and derivatives at knots?</p><p>Q2: As the points are being estimated by a curve with 3 cubics I want to be able to write the curve as a linear combination of these 3 functions, but how do I do this if there are not enough coefficients? I want something like</p><p>y=a0+a1x+a2x^2+a3x^3 + b0+b1x+b2x^2+b3x^3 + c0+c1x+c2x^2+c3x^3</p><p>Any help would be greatly appreciated.</p>Darren Fletcherhttps://fr.mathworks.com/matlabcentral/profile/authors/8503960-darren-fletchertag:fr.mathworks.com,2005:Question/3538412017-08-23T20:25:23Z2017-08-23T20:25:23ZWhen interpreting a .mat file containing a large array, how can I know the actual size of a chunk after it has been decompressed?<p>I have a .mat file containing an array with dimensions 100x101x102. In the file it is said to be stored in chunks (using chunked data storage) with dimensions 1x50x100, so each chunk would contain 5000 elements. After fetching each chunk, decompressing it and saving it to its own file I found that this is true for many of the chunks but there are several which contain only 100 elements and are then padded with zeros up to 5000 elements.
So my question is, for a chunk that contains fewer elements than it is said to, how can I know how much of a chunk is actually apart of the array and how much is just padding?
The file is being stored as a v7.3 mat file, which I understand is formatted according to the third party file format HDF5 so I haven't found a lot of information about this format specific to matlab. I have just been using the file format specification found on the HDF group's website.</p>C Bonnerhttps://fr.mathworks.com/matlabcentral/profile/authors/5660711-c-bonnertag:fr.mathworks.com,2005:Question/422972012-06-28T15:04:31Z2017-08-23T20:21:01ZCopying dynamic array to MxArray object using memcpy in c++<p>I am writing a c++ program that calls that Matlab Engine.
I am getting an error when I try to use memcpy for a dynamically allocated multi-dimensional array. I have a type definition as follows in my header file:</p><p>typedef double* dblArrayptr;</p><p>My array definition in my function is as as follows:</p><p>dblArrayptr *A;</p><p>A = new dblArrayptr [2*NUMROWS];</p><p>for (int i=0;i<2*NUMROWS;i++)</p><pre class="language-matlab">A[i] = new double [2*NUMROWS];
</pre><p>I initialize this matrix A with some values and then try to use the memcpy command as follows: (note: this matrix has 44 rows and 44 columns).</p><p>memcpy((void *)mxGetPr(A_m), (void *)A,1936*sizeof(double));</p><p>I receive a memory access violation error.
Access violation reading location.</p><p>This memcpy command seems to work ok if I have a single array (44x1) of type double.</p><p>Do I have to do an element by element copy?</p>Laurenhttps://fr.mathworks.com/matlabcentral/profile/authors/1061508-laurentag:fr.mathworks.com,2005:Question/3538392017-08-23T20:17:34Z2017-08-23T20:17:34ZMATLAB Deletes Axes Tags When Save Icon is Pressed in GUIDE-created GUI?<p>I've created a GUI in GUIDE and I've been having a frustrating problem wherein pressing the save icon in the toolbar often causes tags for my axes to be deleted. Does anyone know how I can prevent this problem?</p><p>Thanks in advance for your time,
JS</p>JS4444https://fr.mathworks.com/matlabcentral/profile/authors/10482638-js4444tag:fr.mathworks.com,2005:Question/3538382017-08-23T20:16:23Z2017-08-23T20:16:23Zfmincon and patternsearch initial point <p>I had initially planned to use fmincon as my optimization method, but as I varied initial points, I was receiving enough variation in output that I thought perhaps there were several local minima. While this didn't entirely make sense, I tried using patternsearch to find a global solution.</p><pre> clc
clear
%options=optimoptions('fmincon', 'Display', 'iter', 'OptimalityTolerance', 10.0000e-06, 'StepTolerance', 10.0000e-10)
Lmax=.25;
r=.03;
Xfix=.5;
p=.35;
w=40000;
year=80;
growa=12.91;
growb=223.71;
C=20000;
A=[-1 0;0 -1];
b=[0;0];
Aeq=[-1 0];
beq=[-.25];
z=[];
h=[];
iteration=[];
%for m=1:5;
x0=[.1 40];
for n=1:9
utility=@(x)-1*((Lmax-x(1)/(1-exp(-r*x(2))))^(.1*n)*((w*year*Xfix)/r+x(1)*((exp(-r*x(2))*p*exp(growa-growb/x(2))-C)/(1-exp(-r*x(2)))))^(1-.1*n));
[y,fval]=fmincon(utility,x0,A,b,Aeq,beq);
%[y,fval]=patternsearch(utility,x0,A,b,Aeq,beq);
z=[z;y];
h=[h;fval];
iteration=[iteration;n];
end
g=[iteration z h];
min(fval);
i=[z(:,1)];
j=[z(:,2)];
%plot3(i,j,h)
%end
format long g;
g</pre><p>pattersearch appears to only returns an answer when initial point is [0 0]. And by my math, it doesn't seem to be returning a minimum. There is definitely something I'm missing.</p>Eric Greenhttps://fr.mathworks.com/matlabcentral/profile/authors/10774463-eric-greentag:fr.mathworks.com,2005:Question/1004592010-04-26T20:09:00Z2017-08-23T20:04:04ZHow can I insert a title over a group of subplots?<p>I would like to place a title over a group of subplots.</p>MathWorks Support Teamhttps://fr.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:fr.mathworks.com,2005:Question/3534352017-08-21T04:59:09Z2017-08-23T20:00:54ZWhy do the Stereo Camera position not correspond with the "TranslationofCamera2" values ?<p>The calibrator app calibrates the stereo camera and output the extrinsic visualization as follows:</p><img src = "/matlabcentral/answers/uploaded_files/86031/Capture.PNG"><p>Which is very close to my real setup. As you can see from the image. The second camera translation can be approximated at [50 -11 -2]. Whereas the value that shows in my StereoParams object is "stereoParams.TranslationOfCamera2 = [-51.45 0.68 9.81]". Why is there the negative in X axis and other values? This does not make sense. Could anyone help me with this?</p><img src = "/matlabcentral/answers/uploaded_files/86032/Capture.PNG">Gokuhttps://fr.mathworks.com/matlabcentral/profile/authors/6903149-gokutag:fr.mathworks.com,2005:Question/3529172017-08-16T08:52:23Z2017-08-23T19:59:40ZCurve Fitting Tool, generated code issues<p>Hello everyone</p><p>I have used the Curve Fitting Tool box to fit a polynomial to a set of 3D points. The result can be seen below.</p><img src = "/matlabcentral/answers/uploaded_files/85628/cftool.jpg"><p>Now if I let the fitting tool generate a code and run the function with the same inputs, the result looks a lot different:</p><img src = "/matlabcentral/answers/uploaded_files/85629/generatedcode.jpg"><p>the x and y axis are the same (not allowed to show them). The z-axis ranges from 50 to 100 in the first image and from -7000 to 2000 in the 2nd one. Where did I go wrong here and is there any way to fix this?
Here is the automatically generated code:</p><pre class="language-matlab">function [fitresult, gof] = createFit(x, y, z)
%CREATEFIT(X,Y,Z)
% Create a fit.
%
% Data for 'polynomial test' fit:
% X Input : x
% Y Input : y
% Z Output: z
% Weights : z
% Output:
% fitresult : a fit object representing the fit.
% gof : structure with goodness-of fit info.
%
% See also FIT, CFIT, SFIT.
</pre><pre class="language-matlab">% Auto-generated by MATLAB on 16-Aug-2017 10:13:47
</pre><pre class="language-matlab">%% Fit: 'polynomial test'.
[xData, yData, zData, weights] = prepareSurfaceData( x, y, z, z );
</pre><pre class="language-matlab">% Set up fittype and options.
ft = fittype( 'poly53' );
opts = fitoptions( 'Method', 'LinearLeastSquares' );
opts.Normalize = 'on';
opts.Weights = weights;
</pre><pre class="language-matlab">% Fit model to data.
[fitresult, gof] = fit( [xData, yData], zData, ft, opts );
</pre><pre class="language-matlab">% Plot fit with data.
figure( 'Name', 'polynomial test' );
h = plot( fitresult, [xData, yData], zData );
legend( h, 'polynomial test', 'z vs. x, y with z', 'Location', 'NorthEast' );
% Label axes
xlabel x
ylabel y
zlabel z
grid on
view( 125.7, 36.4 );
</pre><p>When I use interpolant on the points instead of polynomial, the result from the generated code fits the tool box however.
Similar question can be found <a href = "https://de.mathworks.com/matlabcentral/answers/352243-curve-fitting-s-generated-code-doesn-t-work">here</a>, no answers yet.</p><p>Thanks for your help!</p>Ingo Rückhttps://fr.mathworks.com/matlabcentral/profile/authors/10432812-ingo-rucktag:fr.mathworks.com,2005:Question/3538132017-08-23T16:54:35Z2017-08-23T19:55:13ZHow can i find the area of objects with RGB<p>Everythime I try find the area my valours is very wrong.This square has a 10000cm^2 and I don't know how this object has the area ocupped</p><p>My code:</p><p>close all;
clear all;
clc;
%%</p><p>%pasta=('F:\LDSC\Eco\Processamento direto\Versao 3\P3-17032017WW');</p><p>pasta=('F:\LDSC\Eco\CAMPOS\2CAMPO\eefd\b\croped');</p><p>dire = dir(pasta); % nome do arquivo, DSC* abre todos os arquivos que começam com esse nome</p><p>tt = length (dire); % conta quantidade de arquivos semelhantes</p><p>w=1;</p><p>areareal=zeros(tt-2,100)</p><p>c=1;</p><pre> for i=3:tt</pre><pre> arq = fullfile([dire(i).name]); % le 1 arquivo</pre><pre> %Algoritmo pra aplicar o threeshold</pre><p>y=imread(arq);</p><p>%Não esquece de chamar a imagem com o nome e extensão certa.
%bw=rgb2gray(y);% FUNÇÃO TRANSFORMA IMAGEM EM CINZA
%.90 foi o melhor numero para aplicar o filtro e nao perder qualidade
imwrite(y,'foto.JPG')
original = imread('foto.JPG');
pt=size(original);%pixelxpixel
pixeltotal= pt(1,1)*pt(1,2);</p><p>imshow(original);</p><p>x = original(:,:,1) < 90;</p><p>imshow(x);</p><p>[B,L] = bwboundaries(x, 'noholes');</p><p>stats = regionprops(L, 'Area');</p><p>qtd_x = sum([stats.Area] > 1);</p><p>imshow(original);</p><p>hold on</p><p>for k = 1:length(B)</p><pre> area = stats(k).Area*10000/(pixeltotal-stats(1).Area);</pre><pre> %*0.022469 Valor de pixel calculado </pre><pre> if area > 1
%Valor pra ser lido na AREAREAL
areareal(w,c)=area;
c=c+1;</pre><pre> end
%Aprimoramento do código
%'Abrir Txt com valores de area '
%Imprimir Foto X - Valor de área</pre><pre> if area > 1
boundary = B{k};
plot(boundary(:,2), boundary(:,1), 'black', 'LineWidth', 2);
text(boundary(1,2), boundary(1,1), sprintf('%.3f',area),...
'Color', 'black',...
'FontSize', 12,...
'FontWeight', 'bold',...
'BackgroundColor', 'white');</pre><pre> end</pre><p>end</p><p>hold on</p><p>% % aqui vai a rotina de préprocessamento</p><pre> w=w+1;</pre><pre> c=1;</pre><pre> save</pre><p>%</p><pre> end</pre><img src = "/matlabcentral/answers/uploaded_files/86230/2017-08-23_134923.png">Werner Barroshttps://fr.mathworks.com/matlabcentral/profile/authors/6158986-werner-barrostag:fr.mathworks.com,2005:Question/3538322017-08-23T19:15:17Z2017-08-23T19:53:32ZIf i have a data for one variable how do I check whether the data is statistically significant or not?<p>I have seen on the scientific papers that on top of the boxplots or on the sides of the figure there are p values. What exactly do they mean and how can this be done in matlab?
Suppose I have a set of data that I want to know whether the data is statistically significant or not?</p>hellohttps://fr.mathworks.com/matlabcentral/profile/authors/10352797-hellotag:fr.mathworks.com,2005:Question/3538232017-08-23T18:17:22Z2017-08-23T19:49:27ZImage analysis - Astronomical .FITS file - streak/line detection<p>I am attempting to write code to automatically analyse a large set of .FITS images (more than 10,000 images).</p><p>My goal is to find those images that contain moving objects (asteroids/satellites), which appear as streaks (lines). I would like to reject images that contain just stars (points of light).</p><p>I have attached several images, in both .fits and .jpg format (as I realise that .fits is not as common. I use the program 'AvisFV' to view these). There are some examples with streaks, and some without. These examples also show the variance in image background, and streak size, that I am dealing with.</p><p><a href = "https://1drv.ms/f/s!AqG6zBac4y6clU-1lj_sDictWxeS">.fits and .jpg examples</a></p><p>I am very new to coding, so would appreciate any suggestions to achieve my goal. After reading through examples and documentation online, I have included my best coding attempt below, however this has not had a lot of success. Here, I have converted from .fits to .jpg before running through MATLAB, however I would prefer to leave in .fits if possible.</p><p>I am not committed to any one way of line detection - any suggestions whatsoever, even if totally different from my attempt below, are welcome and much appreciated!</p><p>Many thanks in advance.</p><pre class="language-matlab">cd F:\DATA\BWHOUGH\IMAGES
% Specify the folder where the files live.
myFolder = 'F:\DATA\BWHOUGH\IMAGES';
</pre><pre class="language-matlab">% Get a list of all files in the folder with the desired file name pattern. Change from .jpg to other file type being used if required.
filePattern = fullfile(myFolder, '*.jpg');
</pre><pre class="language-matlab">% For each image, convert to binary, conduct image processing, then Hough transform
theFiles = dir(filePattern);
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
img = imread(fullFileName);
level = graythresh(rgb2gray(img));
BW = im2bw(rgb2gray(img),level);
BW2= imdilate(imerode(BW, ones(5)), ones(5));
BW3 = bwmorph(BW2,'remove');
[H,T,R] = hough(BW2);
P = houghpeaks(H,15,'threshold',ceil(0.3*max(H(:))));
x = T(P(:,2)); y = R(P(:,1));
lines = houghlines(BW2,T,R,P,'FillGap',5,'MinLength',7);
max_len = 0;
</pre><pre> for j = 1:length(lines)
xy = [lines(j).point1; lines(j).point2];</pre><pre> % Determine the endpoints of the longest line segment
len = norm(lines(j).point1 - lines(j).point2);
if ( len > max_len)
max_len = len;
xy_long = xy;
end
end</pre><pre class="language-matlab">% Adjust desired streak length (max_len, below. 100 works well). Lines below this length will be moved to the ‘NO’ folder, above (hopefully streaks) will be moved to the ‘YES’ folder.
if length(lines)<=0
movefile(baseFileName,'F:\DATA\BWHOUGH\IMAGES\NO')
else
if max_len>=100
movefile(baseFileName,'F:\DATA\BWHOUGH\IMAGES\YES')
else
movefile(baseFileName,'F:\DATA\BWHOUGH\IMAGES\NO')
end
end
</pre><pre class="language-matlab">end
</pre>JFhttps://fr.mathworks.com/matlabcentral/profile/authors/8267281-jftag:fr.mathworks.com,2005:Question/3536842017-08-22T19:48:35Z2017-08-23T19:42:49ZRemoving noise boundaries from segmented binary image that is not part of a curve?<p>I am trying to detect a curve in a image. This curve is broken up in many places. After some segmentation and thresholding my final binary image still has some noise. I will eventually be connecting all the different boundaries but then the noise is also counted as a boundary and that should not be part of the final connected curve. Is there any other function that will analyze boundaries and see if they are part of a curve or just noise??? The noise boundaries are different sizes, different entropies, different perimeters... so I can't just filter by property.</p><p>I have so many different images so Im not looking for a specific solution to one picture. I am just wondering what the best way to remove noise in binary images would be. That's why I haven't attached a picture. I have already tried fitting but that does not seem like a good solution. Maybe if somehow the boundary will be in the curve if it is between the coordinates of the previous boundary and the next??? Maybe some sort of pattern recognition?</p>Aa Mhttps://fr.mathworks.com/matlabcentral/profile/authors/10264504-aa-mtag:fr.mathworks.com,2005:Question/3538252017-08-23T18:34:16Z2017-08-23T19:33:31ZDetermine how many harmonics should be selected to contain 99% of the modulated signal power.<p>c(t) = 6 cos(2pi x fc1 x t)</p><p>m(t) = 2 cos(30pi x 103t)</p><p>kf1 = 50x10^3</p><p>i.e. 2pikf1 = 100pi X 10^3</p><p>The carrier frequency is 88.8 MHz.</p><p>Determine how many harmonics should be selected to contain 99% of the modulated signal
power. You can use the MATLAB built-in besselj function for this task.</p>Mujtaba Husseinhttps://fr.mathworks.com/matlabcentral/profile/authors/5819885-mujtaba-husseintag:fr.mathworks.com,2005:Question/3538332017-08-23T19:25:43Z2017-08-23T19:25:43ZI have a shapefile of Uttarakhand state and precipitation data of cordex domain south Asia and i have already generate spatial plot for it. now I want to extract the rainfall data of specifically this Uttarakhand Region by using this shapefile.<p>i want to use inpolygon function for extraction rainfall data for this particular region. please help me by telling me the appropriate code so that i can extract this particular region by using shapefile</p>Sudip Kunduhttps://fr.mathworks.com/matlabcentral/profile/authors/10746811-sudip-kundutag:fr.mathworks.com,2005:Question/3395012017-05-09T15:50:01Z2017-08-23T19:19:53Zerror with matlab.wsdl.setWSDLToolPath <p>I follow the steps available in : https://www.mathworks.com/help/matlab/ref/matlab.wsdl.setwsdltoolpath.HTML, but the matlab.wsdl.setWSDLToolPath funtion display this error:</p><p>matlab.wsdl.setWSDLToolPath('JDK',jdk,'CXF',cxf)
Error using matlab.wsdl.setWSDLToolPath>checkVersion (line 227)
The path 'C:\Program Files\Common Files\apache-cxf-2.7.18-src' does not seem to be a CXF folder.</p><p>Error in matlab.wsdl.setWSDLToolPath (line 167)
checkVersion(path, 'wsdl2java', 'CXF', '-v', ...</p><p>any idea of what the problem is ?</p>Mario Vindashttps://fr.mathworks.com/matlabcentral/profile/authors/8833471-mario-vindastag:fr.mathworks.com,2005:Question/3538162017-08-23T17:09:32Z2017-08-23T19:16:30ZWeb Server Generic Cookie Injection<p>I was told by my Windows counterpart that you were able to provide a fix (.dll) file for the Nessus plugin 44135 - Web Server Generic Cookie Injection which pops up on a HBSS scan. I need a Redhat 6/7 fix for Matlab 2017a/b. This is what our Vulnerability Manager had to say about it - We were seeing this finding mainly on Windows systems for an issue with Matlab and one of its components "Matlab Connector". We only see it pop up
when Matlab is installed/running on that machine. Please provide a fix. This user's system is blocked every time the scan is ran an he's using Matlab.</p>Melissa Millerhttps://fr.mathworks.com/matlabcentral/profile/authors/10773122-melissa-miller