https://jp.mathworks.com/matlabcentral/answers/questions.atomMATLAB Answers — 新規の質問2018-02-18T19:35:03Ztag:jp.mathworks.com,2005:Question/3833862018-02-18T19:35:03Z2018-02-18T19:35:03ZReferring to question 5 part two... How do i plot the resarray values? There should be two lines, resarray on the y-axis using loglog scaling VS. iterations on the x-axis<p>I am attaching my bisection code, my newton code, and HW4 file and also Homework assignment HW4.pdf... i dont need help with my codes nor am i asking for you guys to do my homework, i am simply attaching all codes needed in order to help me with my question of : how do i plot my resarray values vs. iterations... there should be two lines one for bisection method and one for newton method....</p>Raiven Balderashttps://jp.mathworks.com/matlabcentral/profile/authors/11936541-raiven-balderastag:jp.mathworks.com,2005:Question/3833852018-02-18T19:31:08Z2018-02-18T19:31:08Zmex cannot find library for GPU based lasso regression<p>So I am using this code in the link given <a href = "http://foges.github.io/pogs/">HERE</a>, which is a C++ written GPU capable convex optimiser. I need it to perform GPU based lasso regression (the form of the parameters are given on left side of the page linked in this question under 'examples').</p><p>Problem is in order to set it up, I need to run</p><pre class="language-matlab">pogs_setup -gpu
</pre><p>that's what it says in the instructions given under 'Setup' and 'MATLAB'. However, when I try to do this I get the following error:</p><pre class="language-matlab">'make' is not recognized as an internal or external command,
operable program or batch file.
'export' is not recognized as an internal or external command,
operable program or batch file.
Linking to standard library failed, trying another.
Error using mex
MEX cannot find library 'cudart' specified with the -l option.
MEX looks for a file with one of the names:
libcudart.lib
cudart.lib
Please specify the path to this library with the -L option.
Error in pogs_setup (line 55)
eval(sprintf(['mex -largeArrayDims -I../include -I../gpu/include ' ...
</pre><p>Strangely, when I try to setup the non GPU based version by using this instead:</p><pre class="language-matlab">pogs_setup
</pre><p>I instead get this error:</p><pre class="language-matlab">'make' is not recognized as an internal or external command,
operable program or batch file.
'make' is not recognized as an internal or external command,
operable program or batch file.
Error using mex
MEX cannot find library 'mwblas' specified with the -l option.
MEX looks for a file with one of the names:
libmwblas.lib
mwblas.lib
Please specify the path to this library with the -L option.
Error in pogs_setup (line 33)
eval(sprintf(['mex -largeArrayDims -I../include ' ...
</pre><p>Does anyone know how I can fix this? Your help is much appreciated! My systems specifications are:</p><p>OS: Windows 10
C++ compiler: MinGW64 Compiler
MATLAB version: R2016b</p>Anshhttps://jp.mathworks.com/matlabcentral/profile/authors/7544404-anshtag:jp.mathworks.com,2005:Question/3833842018-02-18T19:29:02Z2018-02-18T19:29:02ZAnyone know what the "yyaxis" function is failing for this code?<p>"Error using yyaxis
Unknown command option right"</p><p>Code:
yyaxis left
plot(AM_TO);
xlabel('Time (sans-units, data was collected at 100Hz)')
ylabel('Acceleration (m/s2)')
title('Torso IMU acceleration forward')
hold on
yyaxis right
plot(HR_int,'r','linewidth',1.1);
ylabel('Heart Rate')</p>Michael Marshhttps://jp.mathworks.com/matlabcentral/profile/authors/9546274-michael-marshtag:jp.mathworks.com,2005:Question/3833802018-02-18T19:08:49Z2018-02-18T19:22:19ZFinding common lat/long points within a range from two data sets of unequal length<p>I have two nx3 matrices (call them A and B) that are essentially 3 combined column vectors, where the first column is latitude, the second is longitude and the third is the value of a given parameter (different parameters in A and B). Basically what I am trying to do is compare the two matrices and find the points within B that match a lat and long pair in A.</p><p>An additional complicating factor is that the A matrix lat/long values are all at one degree intervals (ie.</p><ul><li>Lat, Long, param</li><li>90, 180, 10.4</li><li>89, 90, 17</li><li>55, 0, 0</li><li>78, -60, 5</li><li>etc.</li></ul><p>While matrix B has much more specific coordinates</p><ul><li>Lat, Long, param</li><li>89.067, 179.650, 20</li><li>88.986, 90.000, 17</li><li>55.854, 0.000, 0.9</li><li>78.976, -60.143, 4.5</li><li>etc.</li></ul><p>So what I am trying to do is figure out a way to find the points in B that are within, say a quarter of a degree of points in A (both lat and long)</p>iggyBTUhttps://jp.mathworks.com/matlabcentral/profile/authors/12020550-iggybtutag:jp.mathworks.com,2005:Question/3833822018-02-18T19:16:19Z2018-02-18T19:20:43Zcreate random number with gaussian distribution<p>I need to create a random number with gaussian distribution and with average value of 0 and var of 1. like N(0,1). and also a N(0,10).
how can i do this with matlab?</p>evangelinehttps://jp.mathworks.com/matlabcentral/profile/authors/4975365-evangelinetag:jp.mathworks.com,2005:Question/3833782018-02-18T18:49:56Z2018-02-18T19:19:34ZHow do I generate a random number between two numbers,?<p>how i get random number between two numbers , like i want random number between 20-150 like this ,
random, i know the max number and the minimum number and i want to matlab gave me a random number between the max and the minimum</p>kamal farishttps://jp.mathworks.com/matlabcentral/profile/authors/8166099-kamal-faristag:jp.mathworks.com,2005:Question/3833312018-02-18T10:06:09Z2018-02-18T19:14:39ZDear all, I am new to Matlab. I just want to know, what is the best possible way to label the concentric lines in increasing order such as 1,2,3......from the right side of the attached figure?<p>I want to evaluate the number of contour lines and label the same in the figure itself as 1,2,3,....from right side of the figure.The red line is to indicate the required contour lines which need for counting.</p><img src = "/matlabcentral/answers/uploaded_files/105218/Skelitonize.jpg">Iftak Hussainhttps://jp.mathworks.com/matlabcentral/profile/authors/12174175-iftak-hussaintag:jp.mathworks.com,2005:Question/3832812018-02-17T20:17:09Z2018-02-18T19:13:37ZWhy is the Antenna Designer app return 'Undefined function or variable'?<p>Clicking on the Antenna Designer icon in the apps dropdown returns</p><pre class="language-matlab">Undefined function or variable 'antennaDesigner'.
</pre><p>Running restoredefaultpath and pathtool does nothing. Running 2017a.</p>Joseph Stavitskyhttps://jp.mathworks.com/matlabcentral/profile/authors/12182772-joseph-stavitskytag:jp.mathworks.com,2005:Question/3833462018-02-18T13:52:11Z2018-02-18T19:12:23ZCounting occurrence of matched strings in multiple columns , having common pattern<p>Hi:</p><p>Give that: TN = {'1'}, DS= {'15', '16'... ,'20'}, Names= { Hi, Hello}. I want to count the occurrence of the matched strings from column A,B, and E of the string Hi with any of the elements in <b>DS</b> with the element in <b>TN</b>.
<b>TN</b> and <b>DS</b> are decimal values, which needs to be converted to a hexadecimal form like this " fe80::c30c:0:0: <b>one element of the DS or TN here</b> "
I should have 2 occurrences as shown in the attached file (highlighted in Blue). Thanks!</p><p>Note: A previous question was posted on <a href = "https://www.mathworks.com/matlabcentral/answers/381194-counting-occurrence-of-matched-strings-in-multiple-columns">https://www.mathworks.com/matlabcentral/answers/381194-counting-occurrence-of-matched-strings-in-multiple-columns</a></p>Haidi Bobhttps://jp.mathworks.com/matlabcentral/profile/authors/12107408-haidi-bobtag:jp.mathworks.com,2005:Question/1159762014-02-13T10:40:04Z2018-02-18T19:12:20Zneed code for weight median filter for de-noising of a gray scale image<p>here is an image but i couldn't get a valid code on net the code that i found iy didnt give me back a gray scale image with removed noise but the output of those code is too dark so hope i'll get some help here</p><p>so attaching the image here and waiting for response</p>Filza Ashrafhttps://jp.mathworks.com/matlabcentral/profile/authors/4966987-filza-ashraftag:jp.mathworks.com,2005:Question/3832522018-02-17T16:13:25Z2018-02-18T19:09:22ZGood afternoon. Please I need help. I have my data arrange as (Lat Lon Z) on a regular grid. I want to used this data on regular grid to plot contour without any interpolation of any kind. How do i do it and how best can I arrange my data. Thank you<p>Good afternoon. Please I need help. I have my data arrange as (Lat Lon Z) on a regular grid. I want to used this data on regular grid to plot contour without any interpolation of any kind. How do i do it and how best can I arrange my data. I have been trying so many function for the past three months but nothing work. Thank you as you save me from ignorance.</p>Abimbola Ayenihttps://jp.mathworks.com/matlabcentral/profile/authors/10432135-abimbola-ayenitag:jp.mathworks.com,2005:Question/3831472018-02-16T18:42:27Z2018-02-18T19:07:26ZFourier fit not available in curve fitting tool box<p>Hi,
I only have 3 options for curve fitting in 2017b curve fitting tool box. I don't see the Fourier fit in the pull down menu. Anyone has seen this?
Thanks</p>Gustavo Pottkerhttps://jp.mathworks.com/matlabcentral/profile/authors/12171425-gustavo-pottkertag:jp.mathworks.com,2005:Question/3833752018-02-18T18:19:13Z2018-02-18T18:56:51ZNonlinear regression for adsorption with Langmuir isotherm<p>Can anyone show me how to analyze nonlinear regression for adsorption with Langmuir isotherm? Thank you very much.</p>Duong Nguyenhttps://jp.mathworks.com/matlabcentral/profile/authors/11028313-duong-nguyentag:jp.mathworks.com,2005:Question/3833442018-02-18T13:04:48Z2018-02-18T18:56:35ZHow to control Minortick number<p>Hello,</p><p>Please how can i specify the number of minor ticks (X axis and y axis)?</p><p>thank you</p>Tareq Al-Ma'aitehhttps://jp.mathworks.com/matlabcentral/profile/authors/12085407-tareq-al-ma-aitehtag:jp.mathworks.com,2005:Question/3111562016-11-08T04:28:56Z2018-02-18T18:55:55Z R-CNN stop sign detector code<p>I am trying understand the code for stop sign detector using cnn but i do no identify the "Command" in below sentencie of the program:
"helperCIFAR10Data.download(url,cifar10Data);
I look for help but it shows an error msg</p>Euseb Martinezhttps://jp.mathworks.com/matlabcentral/profile/authors/8907615-euseb-martineztag:jp.mathworks.com,2005:Question/3833762018-02-18T18:24:04Z2018-02-18T18:49:48ZReplacing the zero entry of a vector with the corresponding entry of another vector of the same dimension.<p>Hello everyone,</p><p>Please I need some help about this:</p><p>Suppose I have 2 vectors A=[0;2;0] and B=[3;5;7]. How can I write a command in MATLAB that simply replace the zero entries of vector A with the corresponding non-zero entries of vector B?</p><p>In general, if I have 2 vectors A and B of the same dimension, assuming vector A have some zero entries, but the vector B have no zero entries. How can I replace the all the zero entries of vector A with that of the corresponding entries of vector B?</p><p>Thanks for any help.</p>Hassanhttps://jp.mathworks.com/matlabcentral/profile/authors/3971941-hassantag:jp.mathworks.com,2005:Question/3833732018-02-18T18:06:11Z2018-02-18T18:25:39ZCannot get acceleration/velocity to plot<p>Hello, here is my code. I cannot figure out why it won't work. I get a different error every time I try to change something.</p><pre class="language-matlab">e = 2.71828;
LineWidth = 2;
t = 0:1:200;
a = t*(e.^(0.5*t));
plot(t,a,'--rs','LineWidth')
</pre>Geena Elghossainhttps://jp.mathworks.com/matlabcentral/profile/authors/7908172-geena-elghossaintag:jp.mathworks.com,2005:Question/3833222018-02-18T08:25:20Z2018-02-18T18:20:07ZPSO (particle swarm optimization) Error Coding <p>I've coded a PSO as below:</p><pre class="language-matlab">classdef particle
%PARTICLES Summary of this class goes here
% Detailed explanation goes here
</pre><pre> properties</pre><pre> % Parameters
VarMin = -10;
VarMax = 10;
VarSize = 2;</pre><pre> % Template
position = [];
velocity = [];
cost = [];
bestPosition = [];
bestCost = [];</pre><pre> % Initialize Global Best
GlobalBest = inf;</pre><pre> end</pre><pre> methods</pre><pre> function [ obj ] = particle( varargin )</pre><pre> function circle = CostFunction(x,y)</pre><pre> circle = (x.^2)+(y.^2);</pre><pre> end</pre><pre> % Generate Random Solution
obj.position = unifrnd(obj.VarMin, obj.VarMax, obj.VarSize);</pre><pre> % Initialize Velocity
obj.velocity = zeros(obj.VarSize);</pre><pre> % Evaluation
obj.cost = CostFunction(obj.position,obj.position);</pre><pre> % Update the Personal Best
obj.bestPosition = obj.position;
obj.bestCost = obj.cost;</pre><pre> % Update Global Best
if obj.bestCost < obj.GlobalBest.Cost
obj.GlobalBest = obj.GlobalBest.best;
end</pre><pre> end
end</pre><pre class="language-matlab">end
</pre><p>and have an error:</p><pre class="language-matlab">Struct contents reference from a non-struct array object.
Error in particle (line 51)
if obj.bestCost < obj.GlobalBest.Cost
</pre>Ali Alihttps://jp.mathworks.com/matlabcentral/profile/authors/11235632-ali-alitag:jp.mathworks.com,2005:Question/3831702018-02-16T22:18:40Z2018-02-18T18:19:10ZScan a spectrum ,determine the frequency, signal properties<p>I'd like to make a code to scan a certain known spectrum (ex : 150 MHZ to 250 MHZ)??
How to determine frequency of signals it the spectrum and properties of signals??</p>Mohamed Ashrafhttps://jp.mathworks.com/matlabcentral/profile/authors/9237053-mohamed-ashraftag:jp.mathworks.com,2005:Question/3833742018-02-18T18:14:22Z2018-02-18T18:19:05ZI am getting Error after running & putting the value of variables " Error using quiver (line 44) DOUBLE cannot convert the input expression into a double array. Error in BLT (line 23) quiver(y,u)<img src = "/matlabcentral/answers/uploaded_files/105235/1.JPG">aamir sultanhttps://jp.mathworks.com/matlabcentral/profile/authors/11599659-aamir-sultantag:jp.mathworks.com,2005:Question/397802012-05-30T00:42:00Z2018-02-18T18:16:18ZAnyone using MATLAB on a LINUX OS??<p>Hi,
I am thinking of moving to a LINUX REDHAT operating system. Does MATLAB work/work well on this OS??</p><p>James</p>Jameshttps://jp.mathworks.com/matlabcentral/profile/authors/1411831-jamestag:jp.mathworks.com,2005:Question/3791562018-01-26T13:45:23Z2018-02-18T18:15:59Zhow to name xbars with the names on number sequence?<p>If I have 10 bars on a bar graph, how could i name each bar with a sequence number, for example to use</p><pre class="language-matlab">names=[1:1:10]
</pre><pre class="language-matlab">set(gca,'xticklabel',names)
</pre>Philippe Cornerhttps://jp.mathworks.com/matlabcentral/profile/authors/7103813-philippe-cornertag:jp.mathworks.com,2005:Question/3833662018-02-18T16:36:17Z2018-02-18T18:09:33ZHELP REQUIRED IN PROGRAMMING<p>if i want to give;
d1,d2,d3......d90 all having value as 2 i.e; d1,d2,d3....d90=2
P1,P2,P3......P50 all having value as 18 i.e. P1,P2,P3....P50=18
then how to give these statement in MATLAB</p>adarshhttps://jp.mathworks.com/matlabcentral/profile/authors/2935741-adarshtag:jp.mathworks.com,2005:Question/1518282014-08-21T16:27:24Z2018-02-18T18:06:41ZI can not use my laptop's camera <p>Hello everyone.
I have a laptop which is "toshiba p50-a-14h" and I can not see my camera device in Image Acquisition Toolbox. My previous laptop was lenovo z580 and I could use camera easily.
I have Image Acquisition Toolbox and I think I installed all needed support packages. I hope u can help me.</p><p>Thank you for helping.</p><p>Regards.</p>MEHMET FATIHhttps://jp.mathworks.com/matlabcentral/profile/authors/5455589-mehmet-fatihtag:jp.mathworks.com,2005:Question/3833332018-02-18T10:43:02Z2018-02-18T17:57:31Zhow to count number of values exceeding given threshold in moving window<p>I want to calculate # of values exceeding specified threshold (m) with a moving window of length w (so that we omit the 1st sample and add another sample)
I have a data of 1500 samples.
In matlab r2013
thanx</p>riki ragùahttps://jp.mathworks.com/matlabcentral/profile/authors/12185125-riki-raguatag:jp.mathworks.com,2005:Question/3571392017-09-18T08:50:54Z2018-02-18T17:53:55ZProblem with cifar10 download<p>I'm trying to download cifar10 image set from web page with commands:</p><pre class="language-matlab">%% Download the CIFAR-10 dataset
if ~exist('cifar-10-batches-mat','dir')
cifar10Dataset = 'cifar-10-matlab';
disp('Downloading 174MB CIFAR-10 dataset...');
websave([cifar10Dataset,'.tar.gz'],...
['https://www.cs.toronto.edu/~kriz/',cifar10Dataset,'.tar.gz']);
gunzip([cifar10Dataset,'.tar.gz'])
delete([cifar10Dataset,'.tar.gz'])
untar([cifar10Dataset,'.tar'])
delete([cifar10Dataset,'.tar'])
end
</pre><p>but I get this info</p><pre class="language-matlab">Downloading 174MB CIFAR-10 dataset...
Error using websave (line 103)
Unable to open output file: 'cifar-10-matlab.tar.gz' for writing. Common reasons include that the file exists and
does not have write permission or the folder does not have write permissions.
</pre><pre class="language-matlab">Error in DownloadCIFAR10 (line 13)
websave([cifar10Dataset,'.tar.gz'],...
</pre><p>I can't find file cifar-10-matlab.tar.gz on my computer.</p><p>Previously I downloaded the image set, but I deleted everything - including subfolders, testdata etc.</p><p>How can I succesfully download cifar10 image set?</p>Biserka Petrovskahttps://jp.mathworks.com/matlabcentral/profile/authors/10853599-biserka-petrovskatag:jp.mathworks.com,2005:Question/3833652018-02-18T16:28:58Z2018-02-18T17:47:44ZImhist func not working for a user made matrix!!<p>I need to do a basic operation in a window of an image.I defined a matrix(as a given window.)now i want to find it's histogram..the value x and y ([x y]=imhist(matrix))are not what one would expect if it would have been an image.</p>Pritisman Karhttps://jp.mathworks.com/matlabcentral/profile/authors/11234496-pritisman-kartag:jp.mathworks.com,2005:Question/3833712018-02-18T17:46:49Z2018-02-18T17:46:49ZHow to make all the legend appear in a plot?<p>Im using this code to plot X vector vs all the columns of the table on example.txt</p><pre class="language-matlab">C = readtable('example.txt', 'Delimiter',',');
X = 5:5:430;
%%
for i=1:numel(X)
plot(X,C{:,i})
hold on
grid on
end
LegendString = cell(1,numel(X));
hold all
for k = 1:numel(X)
LegendString{k} = sprintf('%i',X(k));
end
legend(LegendString)
</pre><p>Why the plot is only showing me 50 legends and not all the 86 the code is asking?</p>Philippe Cornerhttps://jp.mathworks.com/matlabcentral/profile/authors/7103813-philippe-cornertag:jp.mathworks.com,2005:Question/3833692018-02-18T17:35:10Z2018-02-18T17:35:10Zprogramming the number of steps till every element of a set appears<p>I need to write a program that simulates the following experiment.</p><p>I have a set of N cards to collect, and at each stage of the experiment a random card is selected with an equal probability of any card, even if the card had been selected before.
I then want to record the number of steps taken for every card to appear.</p><p>Eg. say that N=5, it would generate a sequence of steps, such as 5 3 4 3 5 1 3 4 3 2 randomly. Then record the steps taken till every number has appeared. In this case 10 steps.</p>Daniel Hunthttps://jp.mathworks.com/matlabcentral/profile/authors/11916923-daniel-hunttag:jp.mathworks.com,2005:Question/3833682018-02-18T17:33:48Z2018-02-18T17:33:48Zhow am i going to code this in matlab using multi layer feed forward neural network?<p>im doing my thesis on forecasting unemployment rates.attached is my data.how am i going to do this in matlab using multi layer feed forward neural network?can somebody pls help me...thanks in advance..</p>doeyien misilhttps://jp.mathworks.com/matlabcentral/profile/authors/8072652-doeyien-misiltag:jp.mathworks.com,2005:Question/3833642018-02-18T16:27:38Z2018-02-18T17:15:58ZImporting 200 excel files in the correct order <p>Hi all,</p><p>I am new to MATLAB and trying to combine 200 excel files with the same format, however, I can't seem to get it working.</p><p>For example, my excel files (in the same folder) are named 'Participant1Results.xlsx' to 'Participant200Results.xlsx'
These files are 8x4 (8 rows 4 coloumns) of numeric values.
I have tried two different methods:</p><p>1)</p><pre class="language-matlab">for k = 1:200 %200 participants
filename = (['Participant', mat2str(k), 'Results', '.xlsx']);
data = xlsread(filename)
Resultsdata{k} = data
end
</pre><p>This method seems to scan all files, however Resultsdata only contains participant 200.</p><p>or 2)</p><pre class="language-matlab">Location = uigetdir;
</pre><pre class="language-matlab">Data = dir([Location, '\*.xlsx']);
</pre><pre class="language-matlab">filenames = {Data(:).name}.';
data = cell(length(Data),1);
for k = length(Data):-1:1
fullname = [Location filesep Data(k).name];
data{k} = xlsread(fullname);
end
</pre><p>This method manages to import all data into the format i want as 8x4 double in a 200x1 format, however the order is wrong. Instead of 1, 2, 3, 4 it is ordered as 100,101,102.....10,11,12...1, 200,201... and so on.
This may be an easy problem to solve but I've been lost for a week, any solutions to either would be greatly appreciated!</p>Rayman Sandhurhttps://jp.mathworks.com/matlabcentral/profile/authors/12162206-rayman-sandhurtag:jp.mathworks.com,2005:Question/3833072018-02-18T04:49:11Z2018-02-18T16:56:54ZHi!! I am trying to filter this noisy ECG signal which I have. I tried many of the filtering methods like savitzky golay, FIR(using filter design app). tried with many other types too. But nothing seem to work<p>I have attached the .mat file on which I am trying to filter.
For FIR filter I use (LPF, Kaiser window)
Fs=128000
Fc=120
N=7</p><p>I first design the filter in the Filter design app, then export it in the workspace to perform filtering on the ECG.
Tried lot of permutations and combinations but nothing seems to work.
Also I used PSD method to determine the Fc and approximated it to be 120Hz
Please can anyone help!!</p>Vidula Sawanthttps://jp.mathworks.com/matlabcentral/profile/authors/9983330-vidula-sawanttag:jp.mathworks.com,2005:Question/3817442018-02-09T13:47:46Z2018-02-18T16:51:44ZSir . I have successfully cropped the upper region (in 5 coin) but couldn't crop lower region from the same image as I need to crop the image so to get center part only as high.<img src = "/matlabcentral/answers/uploaded_files/105211/e.PNG"><img src = "/matlabcentral/answers/uploaded_files/105212/t.PNG">ayesha abbassihttps://jp.mathworks.com/matlabcentral/profile/authors/12128614-ayesha-abbassitag:jp.mathworks.com,2005:Question/3833672018-02-18T16:51:14Z2018-02-18T16:51:14ZGraph based bvp4c condition <p>My homework problem is d3y/dx3+a1yd2y/dx2+xy=sinx, y(0)=a2;y(10)=1;y'(0)=2;
I want to generate three graph based on above equations. The first graph contains three lines which are a2 = 0;1and 2 and similar to a1 = 0;0.5 and 1 using bvp4c condition.
Kindly do the needful as soon as possible.
Thanking you</p>prakash jaihttps://jp.mathworks.com/matlabcentral/profile/authors/4432862-prakash-jaitag:jp.mathworks.com,2005:Question/3833452018-02-18T13:18:29Z2018-02-18T16:47:51ZMATLAB -Colour Detection code deployment<p>I have created an project that detects colours and gives out the distance between them ,How do i create a standalone executable for the same .I have tried Application compiler but it gives me an error as imaqtool/Apps and GUI cannot be compiled using .</p><p>Kindly suggest any alternative deployment method thatcan be run without launching MATLAB</p>Ryan Fernandeshttps://jp.mathworks.com/matlabcentral/profile/authors/10786378-ryan-fernandestag:jp.mathworks.com,2005:Question/3833172018-02-18T07:17:00Z2018-02-18T16:39:02Zhow to draw boundaries for all the contours in matlab<p>I have tried drawing the boundaries of the figure cap1 using Matlab code attached. I'm able to draw boundary only for one contour and then I'm getting an error. can u please help with it. I have to fill and draw boundaries for all the contours present</p>rohith bharadwajhttps://jp.mathworks.com/matlabcentral/profile/authors/10485449-rohith-bharadwajtag:jp.mathworks.com,2005:Question/3833372018-02-18T11:57:38Z2018-02-18T16:36:01Zycbcr to grayscale??<p>Is there any way to convert ycbcr to grayscale?
eg</p>Inthuja V.Ghttps://jp.mathworks.com/matlabcentral/profile/authors/11822821-inthuja-v-gtag:jp.mathworks.com,2005:Question/3833632018-02-18T16:26:28Z2018-02-18T16:26:28Zis it possible to run the demo "Performing Large Matrix Operation on FPGA using External Memory" on Intel Altera FPGA?<p>I am using HDL coder 2018a pre-release version to run the demo "Performing Large Matrix Operation on FPGA using External Memory" on Altera FPGA, but had some problems.
Since Altera external memory support Altera PHY Interface(AFI) or Avalon MM(memory mapped) interface, while the demo intrinsically uses AXI-4 bus. So is it possible to run this demo on Alter FPGA?</p>Lin Baihttps://jp.mathworks.com/matlabcentral/profile/authors/10771179-lin-baitag:jp.mathworks.com,2005:Question/3833592018-02-18T15:48:42Z2018-02-18T16:22:46ZImproving my code - I'm trying to generate a checkerboard of size (222,786); length of each size 20. My code did work but I feel the logic can be improved. Kindly help.<pre class="language-matlab">% Channel number 90 to 875
</pre><pre class="language-matlab">chan = 1:1:786;
</pre><pre class="language-matlab">no_of_chan=length(chan);
</pre><pre class="language-matlab">% ffid 77 to 298
</pre><pre class="language-matlab">ffid = 1:1:222;
</pre><pre class="language-matlab">no_of_ffid=length(ffid);
</pre><pre class="language-matlab">% Pre-declaring 'checker' - it is two dimensional
</pre><pre class="language-matlab">checker=zeros(no_of_ffid,no_of_chan);
</pre><pre class="language-matlab">% Parameter to switch between positive and negative trains within if
% statement
</pre><pre class="language-matlab">anomaly=-1;
</pre><pre class="language-matlab">% 1 cell = 100 metres
</pre><pre class="language-matlab">dimension=20;
</pre><pre class="language-matlab">% train is the size of one edge of one checker
</pre><pre class="language-matlab">train=ones(1,dimension);
</pre><pre class="language-matlab">for i=1:ceil((no_of_chan/dimension) - 1 )
</pre><pre> if anomaly==1</pre><pre> train = [train ones(1,dimension)];</pre><pre> anomaly=-1;</pre><pre> else</pre><pre> train = [train -1*ones(1,dimension)];</pre><pre> anomaly=1;</pre><pre> end </pre><pre class="language-matlab">end
</pre><pre class="language-matlab">for i=1:no_of_ffid
</pre><pre> if anomaly==1</pre><pre> checker(i,:)=train(1:no_of_chan);</pre><pre> if rem(i,dimension)==0</pre><pre> anomaly=-1;</pre><pre> end</pre><pre> else </pre><pre> checker(i,:)=-1*train(1:no_of_chan);</pre><pre> if rem(i,dimension)==0</pre><pre> anomaly=1;</pre><pre> end</pre><pre> end</pre><pre class="language-matlab">end
</pre><pre class="language-matlab">imshow(checker);
</pre>Bhargav Boddupallihttps://jp.mathworks.com/matlabcentral/profile/authors/9220712-bhargav-boddupallitag:jp.mathworks.com,2005:Question/3833192018-02-18T07:41:14Z2018-02-18T16:21:09Zwriting a program on matlab<p>Hi, I have to write a program that asks you to enter a number and then shows how many digits it has. Who can help me?</p>m_vdvhttps://jp.mathworks.com/matlabcentral/profile/authors/12179818-m_vdvtag:jp.mathworks.com,2005:Question/3833362018-02-18T10:56:03Z2018-02-18T16:19:59ZPlease help me with "fasterRCNNVehicleTrainingData.mat" ,where can I download this file?<p>Hi,</p><p>I found this tutorial and could not find the fasterRCNNVehicleTrainingData.mat file to run the examples.</p><p><a href = "https://www.mathworks.com/help/vision/ref/trainfasterrcnnobjectdetector.html">RCNN Object detection</a></p><p>Can you please tell me where can I download this file??</p>Thar Htoohttps://jp.mathworks.com/matlabcentral/profile/authors/12184996-thar-htootag:jp.mathworks.com,2005:Question/3833622018-02-18T16:18:55Z2018-02-18T16:18:55ZWhy does my code get a non singleton error?<p>I key in this code</p><pre class="language-matlab">if true
% qe=zeros(2001,1);
qe(1) = q_start(1);
qs=zeros(2001,1);
qs(1) =q_start(2);
qdote = zeros(2001,1);
qdote(1)=0;
qdots=zeros(2001,1);
qdots(1)=0;
qddote=zeros(2001,1);
qddots=zeros(2001,1);
qddot=[qddote qddots];
tau1be=zeros(2001,1);
tau1bs=zeros(2001,1);
tau1b=[tau1be tau1bs];
c1e= cos(qe(1));
c1s=cos(qs(1));
%set starting values of mass matrix
h22= I(1) + m(1)*cL(1)^2;
h11= I(1)+I(2)+m(2)*cL(2)^2+m(1)*(l(2)^2*cL(1)^2-2*l(2)*cL(1)*c1e);
h12= I(1)+m(1)*(cL(1)^2+l(2)*cL(1)*c1e);
H= [h11, h12; h12, h22];
l1= l(1); l2= l(2);
q1= qb(1); q12= q1;
c1e= cos(q1); s1= sin(q1);
c12= cos(q12); s12= sin(q12);
xe=zeros(2001,1);
xs=zeros(2001,1);
xe(1)= l1*c1e + l2*c12;%start displacement matrix
xs(1)=l1*s1+l2*s12;
s2= sin(0);
i=1:2001;
t=i/100;
x2(1)=l1*cos(q_start(1))+l2*cos(q_start(1)+q_start(2));
y2(1)=l1*sin(q_start(1))+l2*sin(q_start(1)+q_start(2));
for i=1:2000 %set up loop
</pre><pre class="language-matlab">if i<200 %before 2 seconds, torque equation is as follows
tau1be(i)=0.02-0.1*qdote(i);
tau1bs(i)=-0.1*qdots(i);
end
if i>201%after 2 seconds, torque equation is as follows
tau1be(i)=-0.1*qdotb(i);
tau1bs(i)=-0.1*qdots(i);
</pre><p>end
tau1b(i,:)=[tau1be(i) tau1bs(i)];
% Integration functions
C= zeros(2,1);
p= m(2)*l(1)*cL(2)*s2;
C(1)= m(1)*l(2)*cL(2)*qdote(i)*(2*qdots(i)-qdote(i))*sin(qe(i));
C(2)= m(1)*l(2)*cL(2)*qdote(i)*(qdote(i)).*sin(qe(i));
UpdateAngle = @(q,qdot)([q+dt*qdot]);</p><p>UpdateVel = @(qdot,qddot)([qdot+dt*qddot]);</p><p>JointAccel = @(Torque,H,Cqdot)(H\(Torque-Cqdot)); %find angle acceleration</p><p>updatepos = @(x,qdot)(x+dt*qdot);
% Compute dynamic</p><pre> qddot(i+1,:) = JointAccel(tau1b(i,:),H,C);
end
but it reads in response </pre><pre class="language-matlab">if true
% Assignment has more non-singleton rhs dimensions than non-singleton subscripts
</pre><p>Error in betterq1bcode (line 73)
qddot(i+1,:) = JointAccel(tau1b(i,:),H,C);end
even though applying such a code to a single row matrix works perfectly. What causes the error?</p>Leo Howardhttps://jp.mathworks.com/matlabcentral/profile/authors/11532173-leo-howardtag:jp.mathworks.com,2005:Question/3833252018-02-18T08:56:02Z2018-02-18T16:15:11ZHow to accurately process multiple frames in a video file using for and while loops<p>I am interested in tracking a white horizontal line that slowly moves up a semicircle (bottom to top) over time. This semicircle is a droplet and the line is the "freezing line" as the droplet freezes. In my code: I import my video > read the frames > crop them and place them into a cell that contains each frame of the freezing droplet. I then select the same column in each frame and wish to analyze the movement of the freezing droplet over time (or frames).</p><p>The problem I am having is my code doesn't read all of the rows in each frame completely. It looks like it stops at the last white pixel. I know this because the cell I am building through my for loop (variable A) has different sized matrices in them. Some matrices have more amounts of rows than others. While what I want is for all matrices to have 230 rows (the max height of the droplet) so that I know the exact location of the freezing line in that frame.</p><p>The following is my code:</p><pre class="language-matlab">%% Scanning droplets for freezing
middle1 = 243; % this is the column in my image (or matrix) that I am scanning from bottom to top
for t = nstart:nend % nstart and nend are the first and last frames to be observed respectively
i = 1; %starting with first row
while i<230 % 230 is the max height of the droplet
if Crop1{t}(i,middle1) == 1 %Crop1 is a cell made of up of video frames
A{t}(i,1) = Crop1{t}(i,middle1); %this is the cell I am having problems with
end
i = i + 1;
end
I = [A{t},;];
end
</pre><p>The end goal of this is to obtain a cell that consists of 700 (which is the amount of frames) matrices. These matrices need to have only 1 column and 230 rows. Then, I will be able to pinpoint the location of the freezing line in each matrix and plot it against time.</p>userhttps://jp.mathworks.com/matlabcentral/profile/authors/8692969-usertag:jp.mathworks.com,2005:Question/3833612018-02-18T16:13:45Z2018-02-18T16:13:45Z変数名のついたフォルダにファイルを移動する<p>mkdirで作成した連番のフォルダの中に</p><p>movefileでABCDEF1~9のファイルを移動させたいと考えています。
（フォルダ名は変数で指定することで、連番などに対応しようと考えています。）</p><pre class="language-matlab">gain = 0;
mkdir(num2str(gain));
movefile ABCDEF* num2str(gain);
</pre><p>このようなコードを作成したのですが、num2str(gain)という名前のフォルダが作られてその中にファイルが格納されてしまいます。
mkdirで作成したフォルダを指定するためにはどのようにすればよいでしょうか。</p>O.Ehttps://jp.mathworks.com/matlabcentral/profile/authors/9008779-o-etag:jp.mathworks.com,2005:Question/3833542018-02-18T15:09:35Z2018-02-18T16:11:55ZWrite in a script file the program that read from user dimensions nxm of matrix and values of matrix and get sum of odd elements for each columns.<p>Write in a script file the program that read from user dimensions nxm of matrix and values of matrix and get sum of odd elements for each columns.</p>Elidjon Bacihttps://jp.mathworks.com/matlabcentral/profile/authors/8283414-elidjon-bacitag:jp.mathworks.com,2005:Question/3833512018-02-18T14:36:51Z2018-02-18T16:07:43ZHello everyone, I want to combine two images in the same created image but I don't want them side by side but up down...<p>How can I do that?</p>Kosmas Kyriakopouloshttps://jp.mathworks.com/matlabcentral/profile/authors/11686235-kosmas-kyriakopoulostag:jp.mathworks.com,2005:Question/3833602018-02-18T15:54:18Z2018-02-18T16:07:15ZGenerate an array of NxN circles using convolution method. <p>So here is the problem: I need to use the convolution method to generate an array of NxN circles where N is any positive number. Based on what I've perceived to tackle this problem, first, I have to make or use a function that pinpoints NxN locations in a meshgrid with equal distances from each other. Next is to make another function to generate a circle (radius can be varied). After that, I will convolve the two functions to generate an array of circles. To visualize, I've attached a simple diagram below.</p><img src = "/matlabcentral/answers/uploaded_files/105228/conv.jpg"><p>So the distance between two points is twice the radius of the circle. The size of the meshgrid is fixed to 1024 by 1024 pixels. Can anyone help? Is my proposition even possible? Thanks.</p>Viron Gil Estradahttps://jp.mathworks.com/matlabcentral/profile/authors/11916742-viron-gil-estradatag:jp.mathworks.com,2005:Question/3833472018-02-18T13:55:51Z2018-02-18T15:55:14ZHow to make a circle with random points inside with the distance of the center to the points? <p>How do I create a circle in which there are 10 points randomly distributed inside and how to measure those points' distances from the center?</p>Sbk Aurthyhttps://jp.mathworks.com/matlabcentral/profile/authors/12185899-sbk-aurthytag:jp.mathworks.com,2005:Question/3833562018-02-18T15:12:37Z2018-02-18T15:46:07ZI am trying to mimic ecg PQRST wave using basic functions such as straight line and cos functions, need some help with it<p>I have decided to use case statements involving different cases for the wave form. there are two scripts, one for QRS wave and other for the humps, using cos and scaling for different values. I am calling these scripts using plot function in another script and successful in getting the total wave but I get different wave colours for different parts and also a zero line during the cos cycle. I need some help to avoid these zero lines and how to get same colour for the wave. Any suggestion appreciated. Thank you for the help in advance.</p>lbhttps://jp.mathworks.com/matlabcentral/profile/authors/9820814-lbtag:jp.mathworks.com,2005:Question/3270362017-02-27T02:39:53Z2018-02-18T15:44:01ZUrgent Puedo instalar Matlab en windows vista de 32-bit<p>Soy nueva usando Matlab y me gustaria poder descargarlo pero mi computadora es windows vista de 32, existe algun link donde yo pueda descargar Matlab?</p>Daniela Ramirezhttps://jp.mathworks.com/matlabcentral/profile/authors/9808303-daniela-ramirez