https://de.mathworks.com/matlabcentral/answers/questions.atomMATLAB Answers — New Questions2017-07-27T20:49:41Ztag:de.mathworks.com,2005:Question/3505572017-07-27T19:36:11Z2017-07-27T20:49:41Zaccess to default line colors<p>Is there a way to easily specify a line color from the (relatively) new default line color ordering? What I'd like is to be able to replace the command</p><p>>> plot(x,y,'b-o')</p><p>with something that gives the new default blue that's different from 'b'.</p><p>If not, and I assume not, then let me make this a feature request. Can you make the command</p><p>>> plot(x,y,'1-o')</p><p>plot a line with the first color in the default ordering, etc?</p><p>This would be useful if I plot a line using 'plot(x,y)' and somewhere down the line want to add another line to the plot that is the same color.</p>Royhttps://de.mathworks.com/matlabcentral/profile/authors/756155-roytag:de.mathworks.com,2005:Question/3298872017-03-14T22:06:30Z2017-07-27T20:44:52Zpcshow() in gui<p>Hi all,
I am using the Computer Vision toolbox to visualize point cloud data in a gui, and I keep on running into an error as follows. I call pcshow() and it works one time, but on the second call to pcshow(), I get the very long error</p><pre class="language-matlab">Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element.
</pre><pre class="language-matlab">Error in vision.internal.pc.initializePCSceneControl>localRotateStopMode (line 79)
btn.State = 'off';
</pre><pre class="language-matlab">Error in hgfeval (line 62)
feval(fcn{1},varargin{:},fcn{2:end});
</pre><pre class="language-matlab">Error in matlab.uitools.internal.uimode/modeControl (line 22)
hgfeval(hThis.ModeStopFcn);
</pre><pre class="language-matlab">Error in matlab.uitools.internal.uimode/set.Enable (line 173)
obj.Enable = modeControl(obj,value);
</pre><pre class="language-matlab">Error in matlab.uitools.internal.uimodemanager>localSetMode (line 173)
set(currMode,'Enable','off');
</pre><pre class="language-matlab">Error in matlab.uitools.internal.uimodemanager/set.CurrentMode (line 111)
obj.CurrentMode = localSetMode(obj,value);
</pre><pre class="language-matlab">Error in activateuimode (line 27)
set(hManager,'CurrentMode',hMode);
</pre><pre class="language-matlab">Error in rotate3d>setState (line 316)
activateuimode(fig,'Exploration.Rotate3d');
</pre><pre class="language-matlab">Error in rotate3d (line 226)
setState(hTarget,arg2,rotatestyle)
</pre><pre class="language-matlab">Error in vision.internal.pc.initializePCSceneControl>initUIMode (line 134)
rotate3d(hFigure,'on');
</pre><pre class="language-matlab">Error in vision.internal.pc.initializePCSceneControl (line 13)
initUIMode(hFigure);
</pre><pre class="language-matlab">Error in pcshow (line 132)
vision.internal.pc.initializePCSceneControl(hFigure, currentAxes, vertAxis,...
</pre><p>This error does not appear when I use pcshow() in contexts other than GUI (eg, direct successive calls to pcshow() with hold on, multiple subplots, etc).</p><p>If anyone has any thoughts I'd appreciate a tip!
Thanks
Yoni</p>Yonatan Chatzinoffhttps://de.mathworks.com/matlabcentral/profile/authors/4331020-yonatan-chatzinofftag:de.mathworks.com,2005:Question/3505632017-07-27T20:26:49Z2017-07-27T20:44:41Zhow to store the values obtained in a for loop?<p>i have to solve tow nonlinear system of equations at two different conditions.
the following is the code.</p><p>when I run this using z=fsolve(@tait, [0,0]) in command window, I am getting the results only at i=2; How to store the values at i=1;</p><pre class="language-matlab">function F= tait(z)
j=1;
%z=zeros(2,2);
a=z(1);
b=z(2);
%a=zeros(2,2);
P0 = 0.101;%initial pressure
d0 = [1259.70;1259.09];%intial density [at T=273.14;273.15]
P = [40.00 59.89; 5.289 10.08];%Pressure [at T=273.14;273.15]
d = [1272.98 1279.40; 1260.97 1262.69];%density [at T=273.14;273.15]
for i =1:2
F(1) = a * log((b + P(i,j))/(b + P0)) - ((d(i,j)-d0(i))/d0(i));
F(2) = a * log((b + P(i,j+1))/(b + P0)) - ((d(i,j+1)-d0(i))/d0(i));
end
end
</pre><p>when i run this in the command window using fsolve(@tait,[0,0], The result is just the value at i=2, but I need the value at i=1 also. Please help me in getting the both values.</p><p>Thank you,</p><p>Pramod</p>pramod nachhuhttps://de.mathworks.com/matlabcentral/profile/authors/5563519-pramod-nachhutag:de.mathworks.com,2005:Question/3505642017-07-27T20:43:05Z2017-07-27T20:44:39ZHow can I use subscript from html in Matlab? Please help.<pre> <p>My first<sub>html </sub> paragraph.</p></pre>Sorayyahttps://de.mathworks.com/matlabcentral/profile/authors/6508983-sorayyatag:de.mathworks.com,2005:Question/3504192017-07-26T23:09:13Z2017-07-27T20:42:48ZBandpower does not seem to be outputting meaningful answers<p>Hello all,
I wrote a script that uses the built in command bandpower to analyze some data. However, my results looked very strange and I realized that Matlab was outputting bandpowers that made no sense, consistently I've found that the sum of all the frequency bands I'm interested in is much higher then the total bandpower itself.</p><p>Here's a sample of the code, I basically do this four different times for the two groups pre/post and then run some statistics on everything</p><pre class="language-matlab">% now lets extract our bandpowers and populate the vectors
% group 1 pre
for ii= 1:size(D_group1_pre,1)
data_baseline= xlsread(fullfile(excel_path_group1, D_group1_pre(ii).name));
data_baseline= data_baseline(:,4); %remove only the actual doppler data
data_baseline(isnan(data_baseline))= []; %remove artifacts/weird titles etc
data_baseline= data_baseline(1:960); %4800 for 2.5
heart_power= bandpower(data_baseline,32,[.6,2]);
lung_power=bandpower(data_baseline,32,[.145,.6]);
myo_power=bandpower(data_baseline,32,[.052,.145]);
symp_power=bandpower(data_baseline,32,[.021,.052]);
endo_power=bandpower(data_baseline,32,[.0095,.021]);
endo2_power=bandpower(data_baseline,32,[.005,.0095]);
bando=bandpower(data_baseline,32,[0,16]);
</pre><pre class="language-matlab">group1_overall_pre(ii)= bando;
group1_cardiac_pre(ii)= heart_power;
group1_respiratory_pre(ii)=lung_power;
group1_myogenic_pre(ii)= myo_power;
group1_sympathetic_pre(ii)=symp_power;
group1_endothelial_pre(ii)=endo_power;
group1_endothelial2_pre(ii)=endo2_power;
</pre><p>in essence for almost each participant myogenic power+ endothelial power is much greater than the total power itself. I have no idea how to remedy this situation. Does 'bandpower(data)' not output the total power in a waveform? Please help!</p><p>thanks so much</p><p>I should also add that my specifying across 0-16 hz activity was just an attempt to remedy the issue, it still exists if I just do bandpower(data_baseline)</p>Cooper Pennerhttps://de.mathworks.com/matlabcentral/profile/authors/6667238-cooper-pennertag:de.mathworks.com,2005:Question/3500222017-07-24T14:33:28Z2017-07-27T20:41:08ZHow to generate multiple entities randomly and control the probability of event occurring? <p>I am trying to create a model in which 4 different entities are generated randomly. Once the entity is generated, then I want to be able to control the probability that the generated event occurs. Is something like this possible, how can it be done?</p>Sebastian Stankiewiczhttps://de.mathworks.com/matlabcentral/profile/authors/10309388-sebastian-stankiewicztag:de.mathworks.com,2005:Question/3502552017-07-25T22:27:12Z2017-07-27T20:34:54ZArithmetic coding for image compression<p>I am working on the topic of image compression I found built in matlab function for arithmetic coding which is
arithenco I want to use it in image compression can any give me example on how to this function for image compression.</p>haithem abdelghanyhttps://de.mathworks.com/matlabcentral/profile/authors/6195722-haithem-abdelghanytag:de.mathworks.com,2005:Question/3505212017-07-27T15:49:13Z2017-07-27T20:28:37ZCan I control how much shared memory Matlab can access?<p>I'm running Matlab 2013 on Windows 7. In Task Manager I can see that I have 1.7 GB of free memory and 2.6 GB of cached/shared/standby memory. Seems like I can only use the free memory - if Matlab tries to use more it gives me an out of memory error. Why can't it access the cached memory? Is there a setting I can change to allow Matlab to access it?</p>Courtneyhttps://de.mathworks.com/matlabcentral/profile/authors/4661445-courtneytag:de.mathworks.com,2005:Question/3505622017-07-27T20:22:23Z2017-07-27T20:26:35ZHow to change the color of a graph only in a particular section?<p>i have data like;</p><p>1 24.71
2 16.28
3 15.247
4 7.7337
5 11.85
6 16.58
7 17.88
8 14.477
9 9.5245
10 17.648
11 19.519
12 13.126
13 9.1243
14 8.324
15 15.337
16 11.886
17 13.626
18 17.718
19 19.189
20 13.586
and i want to plot this data in such a manner that for 1 1o 5 is of different color, 6 to 10 is of different color and so on...</p>AKHILESH KUMARhttps://de.mathworks.com/matlabcentral/profile/authors/9292568-akhilesh-kumartag:de.mathworks.com,2005:Question/3495492017-07-20T09:53:33Z2017-07-27T20:25:13ZMatlab axis position camera<p>Hi, I have a problem in axis position in perspective vision of the camera. I don't understand where it place the axis origin. Could someone help me?
Thank you</p>Umberto Fontanahttps://de.mathworks.com/matlabcentral/profile/authors/7843319-umberto-fontanatag:de.mathworks.com,2005:Question/3505612017-07-27T20:16:33Z2017-07-27T20:16:33ZPlotting beyond memory capabilities<p>I'm looking for a way to dynamically plot a large dataset.</p><p>It should be able to behave like this:</p><p>I plot 3 segments of the data with a window that views 1 of them, the window can be adjusted to view half of segment 2 and segment 3</p><p>when the view is moved far enough into segment 3 then the plot bounds will update and segment 1 will be throw out of memory and segment 4 added so that it will function the same but now will be looking further down the data.</p><p>Essentially I have more data than can comfortable fit in memory and I want to visualize it (not necessarily all at once) but not have to continually generate new plots. It is also important to be able to pretend like the separation of the data doesn't exist when viewing.</p>Kambren Rowlanhttps://de.mathworks.com/matlabcentral/profile/authors/9504471-kambren-rowlantag:de.mathworks.com,2005:Question/3505432017-07-27T17:46:53Z2017-07-27T20:10:30ZLoad multiple files, but it only returns the data in last file<p>I have code to load a data array for a single file. Now I need to modify the code to load several file in a same format. In this example, same number of rows (1600), but each of them have different number columns.</p><p>So far I can only get to the point that it recoginzes there are 5 files in the directory, but it only returns the data in the last file, but not all of them in a combined data array.</p><p>Original Code for one file:</p><pre class="language-matlab">filename='A Socorro 1200 Jul 26 0800.mlog';
fid=fopen(filename,'r'); %Before performing a read or write operation, obj (a file in this case) must be connected to the instrument with the fopen function.
for k=1:8;
tline=fgetl(fid); %tline = fgetl(fileID) reads and returns the next line of the specified file, removing the newline characters. fileID is an integer file identifier obtained from fopen.
end
data=zeros(1600,2459);
k=1;
while tline~=-1 %tline is a character vector unless the line contains only the end-of-file marker. In this case, tline is the numeric value -1.
datastr=regexp(tline,'(?<=">).*(?=<D)','match'); %Match regular expression (case sensitive)
tempdata=textscan(datastr{1},'%f','delimiter',','); %Read formatted data from text file or string. %f specify a string of floating-point numbers.
data(:,k)=tempdata{1};
k=k+1;
tline = fgetl(fid);
end
</pre><p>Here is the modified code:</p><pre class="language-matlab">files=dir('/Users/ichen/Documents/MATLAB/PNT/WSMR_July 2015 MLogs/Vehicle A/A Socorro 1200 Jul 26 *.mlog');
for i=1:length(files)
filename = files(i).name;
fid=fopen(filename,'r'); %Before performing a read or write operation, obj (a file in this case) must be connected to the instrument with the fopen function.
for k=1:8;
tline=fgetl(fid); %tline = fgetl(fileID) reads and returns the next line of the specified file, removing the newline characters. fileID is an integer file identifier obtained from fopen.
end
ncols=length(files);
nrows=1600; %Number of data points for each test set
data=zeros(nrows,ncols);
k=1;
while tline~=-1 %tline is a character vector unless the line contains only the end-of-file marker. In this case, tline is the numeric value -1.
datastr=regexp(tline,'(?<=">).*(?=<D)','match'); %Match regular expression (case sensitive)
tempdata=textscan(datastr{1},'%f','delimiter',','); %Read formatted data from text file or string. %f specify a string of floating-point numbers.
data(:,k)=tempdata{1};
k=k+1;
tline = fgetl(fid);
end
</pre><p>Here are the data files structure. So at the end, I am trying to get a 1600x10220 data array. thanks!</p><ul><li>A Socorro 1200 Jul 26 0800.mlog 1600 x 2459</li><li>A Socorro 1200 Jul 26 0900.mlog 1600 x 2460</li><li>A Socorro 1200 Jul 26 1000.mlog 1600 x 2462</li><li>A Socorro 1200 Jul 26 1100.mlog 1600 x 2460</li><li>A Socorro 1200 Jul 26 1200.mlog 1600 x 379</li></ul>Ivy Chenhttps://de.mathworks.com/matlabcentral/profile/authors/10650781-ivy-chentag:de.mathworks.com,2005:Question/3503862017-07-26T16:46:13Z2017-07-27T20:10:16ZHow to move a picture in GUI corresponds to user input speed?<p>In my GUI, I want a .jpg picture to be able to move along either horizontal or vertical direction. The speed of moving would be a user input value. How can I do that?
Thanks!</p>Waaaaahttps://de.mathworks.com/matlabcentral/profile/authors/7402899-waaaaatag:de.mathworks.com,2005:Question/3474322017-07-05T07:22:10Z2017-07-27T20:01:00ZHi, I'm new to matlab. I have some data on ice shelf melting rates m, which has size: 53x103x3 and dimensions: xi_rho,eta_rho,ocean_time. I would like to plot area-average of melt rate, against ocean_time which has size: 3X1. Any clues on how? thx<p>Melting rate</p>Hans Clarkehttps://de.mathworks.com/matlabcentral/profile/authors/10408947-hans-clarketag:de.mathworks.com,2005:Question/3494182017-07-19T13:01:38Z2017-07-27T19:53:40ZRaster moving window analysis <p>I am quite new to Matlab so I apologize for being naive and am looking for guidance on what direction I should go in/where to look. I am hoping to use some sort of a moving window analysis on a raster (.tif) that is an output of a model of elevation data. With that in mind I would like to calculate local summary statistics (e.g. standard deviation) of the raster within a moving window of a user defined size (e.g. 20 m) and shape (e.g rectangle, square, circle) and then move that window at some increment in the x and y on the raster that is also user defined (e.g. 10 m). All of these values would then be output into a new raster that I could use for statistical analysis.</p><p>My thought was to overlay some sort of a grid onto the raster image that is the size of the desired increment so that each xy intersect/node is a point where the window stops to calculate the summary value. This will ultimately reduce the resolution of the original raster because the output raster resolution will be equal to the user defined x y increment (e.g. 10mm). I've looked into Blockproc, but that isn't quite what I'm looking for since it functions on the pixel scale and only works as a rectangle. It also appears that movstd is similar in this way. Any help would be greatly appreciated!</p>Brian Danhoffhttps://de.mathworks.com/matlabcentral/profile/authors/10595614-brian-danhofftag:de.mathworks.com,2005:Question/3505602017-07-27T19:50:03Z2017-07-27T19:50:03ZHow can ı clear plotted hough line in bw image.<p>I cant delete crop row after find crop row line with hough line transform. I want to convert plotted lines value to binary as zero. The aim of project delete crop roe and detect weeds. Thanks for replay.</p>hayrettin karadolhttps://de.mathworks.com/matlabcentral/profile/authors/6797565-hayrettin-karadoltag:de.mathworks.com,2005:Question/3505542017-07-27T19:05:21Z2017-07-27T19:48:58ZSaving images from figure window in Matlab.<p>I'm saving images 500 dpi, using rendering in export setup from figure window in Matlab. But there is little change I have to make. I get image like below: I mean there is lot of white space at sides which I want to eliminate. White portion is marked with black sketch in image.</p><img src = "/matlabcentral/answers/uploaded_files/83969/Untitled.png"><p>I want to make my image look like this: Whitout any white portion at sides.</p><img src = "/matlabcentral/answers/uploaded_files/83970/Untitledgf.png"><pre> How to do this?
Thanks.</pre>NASEEB SINGHhttps://de.mathworks.com/matlabcentral/profile/authors/7431288-naseeb-singhtag:de.mathworks.com,2005:Question/3505592017-07-27T04:00:00Z2017-07-27T19:47:03ZHow do I "readtable" with a CSV file when table elements have newlines or double quotation marks?<p>I have a table, "DataTable", in a CSV file with elements that are strings containing line breaks, double quotes, and commas. When I read the table from the CSV file, the table is not the same as the one I had originally.</p><p>Why does this happen and how can I read my table using a CSV file?</p>MathWorks Support Teamhttps://de.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:de.mathworks.com,2005:Question/3505582017-07-27T04:00:00Z2017-07-27T19:47:01ZHow do I "writetable" with a CSV file when table elements have newlines or double quotation marks?<p>I have a table, "DataTable", in a MATLAB with elements that are strings containing line breaks, double quotes, and commas.</p><p>When I write the table from the CSV file, the table is not the same as the one I had originally. I get extra rows where the line breaks were and the quotes are not how they were originally.</p><p>Why does this happen and how can I write my table using a CSV file?</p>MathWorks Support Teamhttps://de.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:de.mathworks.com,2005:Question/3496552017-07-20T21:54:00Z2017-07-27T19:42:27Z3/2 pneumatic valve model<p>I am trying to design a 3/2 pneumatic valve (3 ports and 2 positions). The valve has a supply port, common port, and an exhaust port. There isn't a "switch" that I can use in the model, so I have a convoluted series of variable restriction elements in the system. This works on its own, but returns errors when added to the whole system.</p><p>The flow from supply->common and common->exhaust have their own variable restrictions (restriction varies with differential pressure) and I have another variable restriction in series with each one of these acting as a "switch" to turn flow on and off between the ports. This results in a node with no volume element (which I have been reading is a bad thing).</p><p>Any help or advice on how to model this would be greatly appreciated.</p>Ryan Takatsukahttps://de.mathworks.com/matlabcentral/profile/authors/8154877-ryan-takatsukatag:de.mathworks.com,2005:Question/3505202017-07-27T15:47:09Z2017-07-27T19:37:33ZI want to randomly select from a list of rows from a matrix to change the values<p>I have a matrix B of 0's and 1's, and I have selected the rows and columns that contain the 1's. I now want to randomly choose some of these rows to change the value. I have a rate beta of how many of the rows I need to change. So I want the row and column numbers of the matrix that need to be changed, and then I need to change them. This is the code that I tried to use</p><p>B = [0,1,0;0,0,0;0,1,0]</p><p>beta = 0.6</p><p>[rows,cols]=find(B);</p><p>infInd=rows(randn(length(rows)))</p>Charlotte Masonhttps://de.mathworks.com/matlabcentral/profile/authors/10468761-charlotte-masontag:de.mathworks.com,2005:Question/3501062017-07-25T02:12:11Z2017-07-27T19:36:34ZHow to apply Matlab CNN code on an input image with 6 channels<p>I have currently applied the Matbal CNN function to train my research data. Unlike, the Matlab 'lettersTrainSet'with a size of 28x28x1x1500 (4-D array), the input train data of my experiment have a size of 7x7x6x30,000.
The problem I have encountered is that while running the 'trainNetwork' function, Matlab shows me an error: *Error using trainNetwork>iAssertValidImageArray (line 575)
X must be a 4-D array of images.</p><p>Error in trainNetwork>iParseInput (line 329)
iAssertValidImageArray( X );</p><p>Error in trainNetwork (line 68)
[layers, opts, X, Y] = iParseInput(varargin{:});*</p><p>However, the same training data with 3 channels or 1 channels I can run the CNN code without any error message.
It will be a great help if anyone can suggest how to use image data with more than 3 channels in Matlab for CNN classification.</p>Chandrama Sarkerhttps://de.mathworks.com/matlabcentral/profile/authors/7638043-chandrama-sarkertag:de.mathworks.com,2005:Question/3500952017-07-24T23:45:27Z2017-07-27T19:35:41ZWhy is the 'active-set' algorithm being removed from LSQLIN when the alternative 'interior-point' algorithm lacks the same performance?<p>I'm providing an example of a problem that is typical in our use of LSQLIN. We solve a physics based problem where all the constraints are required to ensure a physically real solution. Solving problems like this are at the core of a much larger problem, where LSQLIN is called ~10,000 times per problem. As the LSQLIN ‘interior_point’ algorithm doubles computational time, the removal of ‘active-set’ makes our data processing speed slow down significantly. I understand that 'active-set' may not be available in the future. Does Mathworks plan on addressing what seems to be a downgrade of the LSQLIN to an inferior state? Will ‘interior-point’ ever offer the same performance as ‘active-set’?</p><p>Variables C, d, A and b can be loaded from the attached MAT-file.
C: is full and 45x6
d: 45x1
A: 9x6 each row has 3 non-zero values.
b: 9x1 zeros array</p><pre class="language-matlab">load example
tic; x1 = lsqlin(C, d, A, b, [], [], [], [], [], optimoptions(@lsqlin,'Algorithm', 'active-set','Display','off')); toc
tic; x2 = lsqlin(C, d, A, b, [], [], [], [], [], optimoptions(@lsqlin,'Algorithm', 'interior-point','Display','off')); toc
Elapsed time is 0.002902 seconds.
Elapsed time is 0.006580 seconds.
</pre>David Sinexhttps://de.mathworks.com/matlabcentral/profile/authors/4992527-david-sinextag:de.mathworks.com,2005:Question/1799162015-02-23T18:52:28Z2017-07-27T19:35:39ZHow to delete lines detected by Hough Transform<p>How can I delete those lines detected by hough transform in a binary image. I want to set their pixels to zero</p><img src = "/matlabcentral/answers/uploaded_files/26005/Hough%20Transform.png">Mahmoudhttps://de.mathworks.com/matlabcentral/profile/authors/5880015-mahmoudtag:de.mathworks.com,2005:Question/3505562017-07-27T04:00:00Z2017-07-27T19:32:02ZWhy is running a script from the Mac Terminal much slower than in the MATLAB Command Window?<p>I have some code where I load in some data, build a waterfall plot, and then print that plot using the "print" command (with the `-dpng` and `-r300` arguments set).</p><p>When I run the script from the Command Window, it takes 60 seconds to run. When I run the same script from the command line (Terminal), it takes ~760 seconds to run.</p><pre class="language-matlab">$ /Applications/MATLAB_R2016a.app/bin/matlab -nodisplay -nosplash < test_waterfall.m
</pre><p>Why is running the script from the Terminal so much slower?</p>MathWorks Support Teamhttps://de.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:de.mathworks.com,2005:Question/3505532017-07-27T19:03:18Z2017-07-27T19:29:21ZData that plots in excel, but not Matlab<p>Has anyone every had simple x,y data that plots in excel, but not in MatLab? I've tried every which way to import the data to my workspace, but I am getting blank data points, despite the x and y axes being to the correct scale. I even tried setting the color of the data points/line, but it still won't show. Also getting no error messages.</p><p>Any suggestions???</p><p>Cheers.</p>Vincent Clementihttps://de.mathworks.com/matlabcentral/profile/authors/7552387-vincent-clementitag:de.mathworks.com,2005:Question/3505282017-07-27T04:00:00Z2017-07-27T19:17:05ZError with "timetable" when using the same "VariableNames" argument as for successful use of "table"<p>I am not able to use the same 'VariableNames' argument for "timetable" as for the "table" function.</p><p>Here is an example. These two commands run fine and create a table and a timetable with columns named "Date" and "Info".</p><pre class="language-matlab">>> t1 = table(dates, info, 'VariableNames', {'Date', 'Info'});
>> tt1 = table2timetable(t1);
</pre><p>But the following command creates an error:</p><pre class="language-matlab">>> tt2 = timetable(dates, info,'VariableNames', {'Date', 'Info'});
</pre><pre class="language-matlab">Error using matlab.internal.tabular.private.tabularDimension/assignLabels (line 365)
The VariableNames property must contain one name for each variable in the table.
Error in matlab.internal.tabular.private.varNamesDim/validateAndAssignLabels (line 332)
obj = obj.assignLabels(newLabels,fullAssignment,varIndices);
</pre><pre class="language-matlab">Error in matlab.internal.tabular.private.tabularDimension/setLabels (line 173)
obj = obj.validateAndAssignLabels(newLabels,indices,fullAssignment,...
fixDups,fixEmpties,fixIllegal);
</pre><pre class="language-matlab">Error in matlab.internal.tabular.private.tabularDimension/createLike_impl (line 355)
obj = obj.setLabels(dimLabels,[]);
</pre><pre class="language-matlab">Error in matlab.internal.tabular.private.varNamesDim/createLike (line 70)
obj = obj.createLike_impl(dimLength,dimLabels);
</pre><pre class="language-matlab">Error in tabular/initInternals (line 207)
t.varDim = t.varDim.createLike(nvars,varnames); % error if invalid, ...
duplicate, or empty
</pre><pre class="language-matlab">Error in timetable (line 233)
t = t.initInternals(vars, numRows, rowtimes, numVars, varnames);
</pre><p>I do not understand the "timetable" failure, since the arguments are identical to the successful "table" constructor call.</p>MathWorks Support Teamhttps://de.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:de.mathworks.com,2005:Question/3505552017-07-27T04:00:00Z2017-07-27T19:17:01ZHow to receive only one file using submitftp for several message types and several trade fields<p>We have a subscription to Thomson Reuters TickHistory and we use MATLAB to download data. What we have been doing is running the following:</p><pre class="language-matlab">>> x = submitftp(r, contractName, {'Price'},...
{t1,t2}, 'TimeAndSales', 'Trade', 'CBT', 'FUT');
>> x = submitftp(r, contractName, {'Bid Price','Ask Price'},...
{t1,t2}, 'TimeAndSales', 'Quote', 'CBT', 'FUT', 1);
</pre><p>Each of the commands has different message types ('Trade' and 'Quote') and different trade fields ({'Price'} and {'Bid Price', 'Ask Price'}).</p><p>This generates two files - one with trade data and the other with Bids/Asks. We would like to get the same data in a single file. We know that we can do this from the Thomson Reuters web interface, but have not figured out the right command in MATLAB.</p>MathWorks Support Teamhttps://de.mathworks.com/matlabcentral/profile/authors/4622813-mathworks-support-teamtag:de.mathworks.com,2005:Question/3504102017-07-26T20:55:44Z2017-07-27T19:15:59ZSaving image from figure with freehand draw<p>I read an image, open a figure, and imshow that image on the figure. Then I imfreehand on that figure. How do I automatically save that resultant image in the figure that has the freehand drawing on it??? Do I need to "burn" the freehand drawing into the image or can is there a function that saves everything displaying on a figure. I want to save it to a folder in my computer.</p>Aa Mhttps://de.mathworks.com/matlabcentral/profile/authors/10264504-aa-mtag:de.mathworks.com,2005:Question/3498852017-07-23T08:59:25Z2017-07-27T19:15:14ZHow to create a layer using Neural Network like the C3 Layer of LeNet?<p>the C3 Layer of LeNet-5,is not a fully connect convolutional layer. every filter of this layer only take 4~5 feature map as a input from the previous layer. how could I build this kind of layer on Matlab? Using the Neural Network ToolBox or other function?</p>LINGJUN KONGhttps://de.mathworks.com/matlabcentral/profile/authors/9640865-lingjun-kongtag:de.mathworks.com,2005:Question/3503912017-07-26T18:27:13Z2017-07-27T19:11:28ZHow to access Matlab Online<p>I have a student license for Matlab, but I don't know how/cannot use Matlab Online. When I log in it says that the user (me) "has no entitlements." What exactly does this mean? Am I at all able to use the Online service?</p>Bakari Smithhttps://de.mathworks.com/matlabcentral/profile/authors/4951002-bakari-smithtag:de.mathworks.com,2005:Question/3498832017-07-23T07:30:42Z2017-07-27T19:11:24ZMultiple Sums Through a For Loop<p>Hi,</p><p>I have the following code:</p><pre class="language-matlab">deg = 2;
poly = 11;
numpt = deg+1;
upt = (poly*deg)+1;
a = -2;
b = 2;
A = zeros(numpt,poly);
x = linspace(a,b,upt);
A(:,1) = x(1:numpt)';
A(:,2) = x(3:5);
for j = 2:poly
A(:,j) = x(j * deg - numpt + 2 : j * deg +1)';
end
v = A;
B = 1 ./ (1+ 25*v.^2);
N = length(v);
M = 255;
N1 = numpt;
C = zeros(N,M);
W = zeros(M,length(v));
a1 = min(v);
b1 = max(v);
for j = 1:length(v)
W(:,j) = linspace(a1(:,j),b1(:,j),M);
end
W = W';
%%%%%%%%% Below this line is what is being modified %%%%%%%%%
for i = 1:N
for j = 1:N1
prod2 = 1.0;
for k = 1: N1
if k ~= j
prod2 = prod2.*(W(i,:) - v(k,i))./(v(j,i) - v(k,i));
end
end
C(i,:) = prod2;
D(:,j) = B(j,11)*C(11,:) % specific to column 11 in matrix B
end
end
DD = sum(D,2);
</pre><p>Goal: somehow generate a 255 x 3 matrix, 11 times, and run a summation of the rows in each of the 3 columns, N1 times i.e. 11 times instead of each time manually.</p><p>I'm trying to run these two lines in the above code at the same time in a for loop:</p><pre class="language-matlab">D(:,j) = B(j,11)*C(11,:) % specific to column 11 in matrix B
DD = sum(D,2);
</pre><p>Meaning multiply values of matrix C (size = 11x255) and matrix B (size = 3x11) (do this N1 times i.e. 11 times since there are 11 columns in matrix B) and then store this into matrix D (size = 255 x 3) and then sum each of the 255 row values of matrix D so matrix D becomes (size = 255 x 1)</p><p>I'm trying to consolidate all of this code into one main for loop, or nested / multiple loops if needed.</p><p>I used column 11 in matrix B above, just as a sample test to see if the code worked manually.</p><p>I want to apply the operation to all of the columns in matrix B i.e. 1 to 11 or 1:N1.</p><pre class="language-matlab">%%%%%%%%%%% Tried something like this but it's not working
for i = 1:N
for p = 1:N1
E(:,i) = sum(B(p,i)*C(i,:),1);
end
end
%%%%%%%%%%% Tried something like this but it's not working
</pre><p>Any advice?</p><p>Thanks.</p>John Stulichhttps://de.mathworks.com/matlabcentral/profile/authors/10550050-john-stulichtag:de.mathworks.com,2005:Question/3505472017-07-27T18:03:02Z2017-07-27T19:10:07ZHow to execute a function which has the same name as another variable?<p>I defined two functions as follows:</p><pre> function output=l2()
D=1;
C=2;
clear C
output=C*D;
end</pre><pre class="language-matlab">function output=C()
output=0;
end
</pre><p>The point here is test whether a function can be called when there is another variable has the same name as the function does. Apparently, without line 'clear C', the output of l2 will be 2 due to the function precedence order. After removing C from workspace of l2, however, there is an error message coming out while executing line 'output=C*D':</p><pre> >> l2
Reference to a cleared variable C.</pre><pre> Error in l2 (line 5)
output=C*D;</pre><p>It seems to me that matlab somehow recognizes C as a variable when it sees line 'C=2'.It will remember the type of C as an variable even if the latter is removed from workspace, so it will ignore that there is another function also named C and report an error when evaluating the following line, even if the line is totally legit. Am I understanding it correctly?</p><p>Nonetheless, even stranger, if I execute function l2 in debug mode with break point on line 'clear C', and type 'output=C*D' in command line after running 'clear C', it would work, no error reported. If at this time I press
F10 to let debug process proceed, the same error as above would be shown. So it is so strange to me that matlab sometimes knows where to find alternative meaning behind a name (function instead of variable in the case above) but sometimes it just cannot.</p><p>Could anyone please explain the reason why matlab fails to execute 'C' as a function in this case? Note that C is already deleted from workspace. And more importantly, is it possible to add some code between line 'clear C' and 'output=C*D' to implement what I intend to do here? I do want to keep other parts of code unchanged.</p>MrQTTThttps://de.mathworks.com/matlabcentral/profile/authors/10650587-mrqttttag:de.mathworks.com,2005:Question/3495982017-07-20T14:29:07Z2017-07-27T19:00:35ZError using griddedInterpolant. The grid vectors must contain unique points<p>Hi All,</p><p>Trying to plot two different datasets with a uniform x-axis I ran through a loess filter. My code for the interp/plotting worked on one dataset, but not on another. Can't seem to figure out the issue here.</p><p>The one that worked:</p><pre class="language-matlab">% Interpolation Method
% y1 = first dataset
% yn = nth dataset
% yn = interp1(x,y,std x component,'[insert optional interp method]')
% repeat for nth datasets
</pre><pre class="language-matlab">y1 = interp1(x87Age,y87C,t_comp87);
y2 = interp1(x41Age,y41C,t_comp41);
</pre><pre class="language-matlab">plot(x87Age,y87C,'o');
hold on
plot(x41Age,y41C,'o');
plot(t_comp87,y1);
plot(t_comp41,y2);
</pre><p>The one that didn't work</p><pre class="language-matlab">% Interpolation Method
% y1 = first dataset
% yn = nth dataset
% yn = interp1(x,y,std x component,'[insert optional interp method]')
% repeat for nth datasets
</pre><pre class="language-matlab">y1 = interp1(x87Age,y87C,t_comp87);
y2 = interp1(x79Age,y79C,t_comp79);
</pre><pre class="language-matlab">plot(x87Age,y87C,'o');
hold on
plot(x79Age,y79C,'o');
plot(t_comp87,y1);
plot(t_comp79,y2);
</pre><p>Any ideas???</p>Vincent Clementihttps://de.mathworks.com/matlabcentral/profile/authors/7552387-vincent-clementitag:de.mathworks.com,2005:Question/3435052017-06-06T11:32:48Z2017-07-27T18:58:58ZI have a problem of the function findpeaks R2015b : it does not detect the flat peaks like in the version of R2013b<p>I used the same program in both versions of Matlab R2015b and R2013a. In the version R2013a, I use the function 'findpeaks' and it does detect all the peaks (even the flat peaks), however the same code implemented in the version R2015b of Matlab does not detect the flat peaks. I don't understand if it is related to the options of the function 'findpeaks' or there is an extension to add to one of the versions.</p>Salma Benslimanehttps://de.mathworks.com/matlabcentral/profile/authors/7482085-salma-benslimanetag:de.mathworks.com,2005:Question/3505482017-07-27T18:19:25Z2017-07-27T18:56:30ZHow can I create a symbolic variable array to be used in solve instruction?<p>Hi!</p><p>Here is my problem. I have a linear system to solve. These are the equations:</p><p>eq1= xw== xo+d.*A(:,1);</p><p>eq2= yw== yo+d.*A(:,2);</p><p>eq3= zw== zo+d.*A(:,3);</p><p>where the unknown values are three scalar numbers (xo,yo,zo) and an array (d). xw,yw,zw and A columns are also arrays of the same size of d (that varies every time).</p><p>sol=solve([eq1,eq2,eq3],[xo,yo,zo,d(1:count,1)])</p><p>How can I call back the elements in d while using solve? d array has been created in this way:</p><p>d = sym(zeros(count, 1));</p><p>for k=1:COUNT</p><pre class="language-matlab">d(k,1) = sym(sprintf('x%d', k));
</pre><p>end</p><p>Writing d(1:count,1) in solve() gives me an error:</p><p>Error using sym.getEqnsVars>checkVariables (line 92)
The second argument must be a vector of symbolic variables.</p><p>Error in sym.getEqnsVars (line 54)
checkVariables(vars);</p><p>Error in solve>getEqns (line 451)
[eqns, vars] = sym.getEqnsVars(argv{:});</p><p>Error in solve (line 226)
[eqns,vars,options] = getEqns(varargin{:});</p><p>Please help me!
Andrea</p>Andrea Massahttps://de.mathworks.com/matlabcentral/profile/authors/10650957-andrea-massatag:de.mathworks.com,2005:Question/3505522017-07-27T18:54:21Z2017-07-27T18:54:21ZIn the eegplot GUI under display there is an option to remove the DC offset. How can I do this from the command line? <p>rmbase does not do as good of a job so I'm assuming there must be another function or combination that works.</p>Taylor D Streitzhttps://de.mathworks.com/matlabcentral/profile/authors/5592636-taylor-d-streitztag:de.mathworks.com,2005:Question/3500542017-07-24T18:06:02Z2017-07-27T18:53:31ZIntegral3 with Error using - Matrix dimensions must agree.<p>I tried to use the numerical triple integral to price the basket option, however this error message keeps popping up and I cannot locate the misused "-"</p><pre class="language-matlab">S1_0=100; S2_0=85; S3_0=75;
T = 2;
a = [1/3 1/3 1/3].';
K = 85;
r = ones(3,1)*0.05; % interest rate
sigma = [0.2 0.15 0.28]';
sigma_sqr = (sigma.^2);
sigma_cov = kron(sigma.',sigma);
rho = [1 -0.2 -0.3; -0.2 1 0.25; -0.3 0.25 1];
sigma_cov = sigma_cov.* rho;
sigma_cov_T= sigma_cov*T;
sigma_cov_T_inv = (sigma_cov*T)^(-1);
sqrt_det_2pi_Sigma_T= (det(2*pi*sigma_cov_T))^(1/2);
payoff = @ (x1, x2, x3) max(a(1)*S1_0*exp(x1) + a(2)*S2_0*exp(x2) + a(3)*S3_0*exp(x3) - K, 0);
normal_density_3d =@(x1,x2,x3) 1/sqrt_det_2pi_Sigma_T*...
exp((-1/2).*(([x1 ;x2; x3]-((r-(1/2)*sigma_sqr)*T))'...
* sigma_cov_T_inv...
*([x1 ;x2; x3]-(r-(1/2)*sigma_sqr)*T)));
integrand = @(x1, x2, x3) payoff(x1, x2, x3) .* ...
normal_density_3d(x1,x2,x3);
</pre><pre class="language-matlab">price = exp(-r*T)*integral3(integrand,-3,3,-3,3,-3,3);
</pre><pre class="language-matlab">Error using -
Matrix dimensions must agree.
</pre><pre> Error in
@(x1,x2,x3)1/sqrt_det_2pi_Sigma_T*exp((-1/2).*(([x1;x2;x3]-((r-(1/2)*sigma_sqr)*T))'*sigma_cov_T_inv*([x1;x2;x3]-(r-(1/2)*sigma_sqr)*T)))</pre><pre> Error in @(x1,x2,x3)payoff(x1,x2,x3).*normal_density_3d(x1,x2,x3)</pre>Shu Yeung Wonghttps://de.mathworks.com/matlabcentral/profile/authors/8166407-shu-yeung-wongtag:de.mathworks.com,2005:Question/3503922017-07-26T18:29:04Z2017-07-27T18:52:12ZNEURAL NETWORK-SIGMOID FUNCTION<p>I am working on using Artificial Neural Network for prediction.</p><p>My expected_Targets have values between 0 and 1.</p><p>The trained Neural_Target has sometimes -0.234 and 1.567 . </p><p>Therefore, I want the trained Neural_Target to be in the range of 0 and 1. That is, any number less than 0.5 should be 0 and numbers above 0.5 should be 1.</p><p>I know I am to use "logsig" but I could not figure it well using MATLAB documentation.</p><p>Thanks in advance for your help</p><p>NEURAL NETWORK-SIGMOID FUNCTION. Available from: https://www.researchgate.net/post/NEURAL_NETWORK-SIGMOID_FUNCTION [accessed Jul 26, 2017].</p>Abu Muaadh AlDrWiyhttps://de.mathworks.com/matlabcentral/profile/authors/6885007-abu-muaadh-aldrwiytag:de.mathworks.com,2005:Question/3494772017-07-19T19:23:14Z2017-07-27T18:45:39ZHow can I obtain the data output after ECG Noise removal<p>Hello, I am new to MATLAB and working on a project on analysing ECG Signals. I have passed my ECG raw data for noise removal through this code: https://www.mathworks.com/examples/matlab-dsp-system/mw/dsp-ex49143500-removing-high-frequency-noise-from-an-ecg-signal, and can see that the noise has been greatly reduced. May I know how may I obtain the modified value of each point for further processing, please? Thank you.</p>Toby Lauhttps://de.mathworks.com/matlabcentral/profile/authors/10575637-toby-lautag:de.mathworks.com,2005:Question/3292972017-03-11T11:23:31Z2017-07-27T18:40:55ZDetecting objects by template<p>Hey,
I'm working on an object detection. I have an image from multiple objects:</p><img src = "/matlabcentral/answers/uploaded_files/72042/ikea_random_white.JPG"><p>and want to find all screws, for example of this type:</p><img src = "/matlabcentral/answers/uploaded_files/72041/screw_image.JPG"><p>Currently im trying to extract the screws edges using the canny algorithm. Then I want to use the generalized Hausdorff measure to search for it: <a href = "http://www.cs.cornell.edu/vision/hausdorff/hausmatch.html">http://www.cs.cornell.edu/vision/hausdorff/hausmatch.html</a></p><p>I'm not sure whether this is the right approach. Since I am a newbe maybe you can give me some hints for the best practices? Note that this should work for multiple objects and images. I tried using the image gradient and boundarys, too. But this failed because I could not get meaningful contours. It would be great to work with contour snippets, which would not make it neccessary to extract the whole object.</p><p>Thanks in advantage</p>Anika Paulsenhttps://de.mathworks.com/matlabcentral/profile/authors/9892327-anika-paulsentag:de.mathworks.com,2005:Question/3505502017-07-27T18:29:21Z2017-07-27T18:29:21ZHow can I run a Low Pass Filter over a Digital Elevation Model to Reduce Noise?<p>I want to run an elevation profile tool over a Digital Elevation Model (DEM) in ArcGIS. The DEM is noisy so the profile returned is jagged. I am looking to run a Low Pass Filter over the DEM in order to "blur" it, reducing the noise, and smoothing the extracted profile.</p><p>The DEM is:
17997x8369 pixels
1 Band
32 bit floating point</p><p>The code I have been using to try and achieve this is:</p><pre class="language-matlab">I = imread('DEM.tif');
G = fspecial('gaussian',[5 5],2);
Ig = imfilter(I,G,'same');
I2 = im2double(Ig);
imwrite(I2, 'DEM_5_2.tif')
</pre><p>However this simply returns a black box. How would I go about running a low pass filter over this image correctly?</p>Jake Collins-Mayhttps://de.mathworks.com/matlabcentral/profile/authors/10644355-jake-collins-maytag:de.mathworks.com,2005:Question/3505492017-07-27T18:27:28Z2017-07-27T18:42:38ZHow can I modify this code so that canny edge detector can detect this red mark line ? <p>I take image using Microsoft kinect. But all time canny edge detector missed that line. I dont know why ?how can i detect this line? I attached here raw depth image & output of canny. Don't hesitate about black depth image. it works. When u run my code u will see that in red arrow area of raw depth image has an edge but after canny operation it vanished.
A_depth_distance=imread(raw_depth_image);
figure,imshow(A_depth_distance,[0 4500]);</p><pre class="language-matlab">%Filtering the raw depth image Median
filtered_depth_distance=medfilt2(A_depth_distance,[3 3]);
figure,imshow(filtered_depth_distance,[0 4500]);
title('Filtering the raw depth image Median');
</pre><pre class="language-matlab">%Edge Detection Using Canny Operator
edges_depth_distance=edge(filtered_depth_distance,'canny',[0 .02],4);
figure, imshow(edges_depth_distance);
title('Image obtained using Canny Operator');
</pre><p>Raw Depth Image:</p><img src = "/matlabcentral/answers/uploaded_files/83964/3.png"><p>Canny output:</p><img src = "/matlabcentral/answers/uploaded_files/83963/klop.png">sufian ahmedhttps://de.mathworks.com/matlabcentral/profile/authors/10225144-sufian-ahmedtag:de.mathworks.com,2005:Question/3505262017-07-27T16:22:01Z2017-07-27T18:23:45ZFinding inv(A) for Ax=b system<p>I tried 3 methods to solve the system for inv(A), where A is highly sparse matrix spy(A) is given below:</p><p>1) pinv(A)......... Matlab solve it in 190 sec without any warnings.</p><p>2) A\b............. Matlab took only 10 sec but gives warning "Matrix is singular to working precision"</p><p>3) [L,U]=lu(A); inv(L)*inv(U) .......... Matlab took 50 sec but give the same warning as in 2nd method.</p><p>Is there anyway, I can get inv(A) without warnings.</p><img src = "/matlabcentral/answers/uploaded_files/83945/GSM%20Matrix.jpg">Asif Arshidhttps://de.mathworks.com/matlabcentral/profile/authors/7166808-asif-arshidtag:de.mathworks.com,2005:Question/3504362017-07-27T04:30:49Z2017-07-27T18:18:05ZHow to Enhance Image edges after segment on Binary Image <p>How to Enhance Image edges after segment on Binary Image</p><img src = "/matlabcentral/answers/uploaded_files/83905/binary_image.png">Selva Karnahttps://de.mathworks.com/matlabcentral/profile/authors/4733665-selva-karnatag:de.mathworks.com,2005:Question/3501222017-07-25T05:26:07Z2017-07-27T18:16:29ZHow can I export to a file xopt and fval parameters from a pattern search function at each iteration? <p>the function is: [xopt,fval] = patternsearch(@(x)bi_dop(x,rx,tx,const,dop,phi,t), x0, [],[],[],[],lb,ub,options)</p><p>Is there a way to iterate inside the pattern search so that the output does not give me only the final value of xopt.</p>Alexe Bojovschihttps://de.mathworks.com/matlabcentral/profile/authors/1894385-alexe-bojovschitag:de.mathworks.com,2005:Question/3505272017-07-27T16:29:20Z2017-07-27T18:04:06Zhow to add a sinusoidal signal and rectangular pulse in matlab<p>sin(t)+[u(t)-u(t-3)]</p>shashi boorlahttps://de.mathworks.com/matlabcentral/profile/authors/10650651-shashi-boorlatag:de.mathworks.com,2005:Question/3505302017-07-27T16:34:49Z2017-07-27T17:59:09ZHi all, I want to assign variables to my single column table data of strings in matlab<p>say I have this data in a table type:
b= 'come'
'go'
'see'
'west'
'done'</p><p>and I want assign letters from A-Z to each member. so I'll have something like 'come' = A. but since the data is more than 26 rows, I'd preferably have 'come'=A1, 'go'=B1 and the last string = Zn.
Any inputs would be appreciated!</p>Bernard Opokuhttps://de.mathworks.com/matlabcentral/profile/authors/10581152-bernard-opokutag:de.mathworks.com,2005:Question/3505462017-07-27T17:58:25Z2017-07-27T17:58:25ZYAxis Exponent doesnt change after flipping YTick<p>I need to reverse the yaxis index, then flip the image. However the exponential disappears after the YDir is set to 'Reverse'. The MATLAB suggested dot notation is not working in the following example that should accomplish all of these tasks:</p><pre class="language-matlab">open 'myfig.fig'
figure(1); subplot 311; % I don't think this matters here, but maybe doing this in a subplot is an issue
yTicks = get(gca, 'YTick'); % get yaxis index
yTicksReverse = sort(yTicks, 2, 'descend'); % reverse yaxis index
set(gca, 'YTickLabel', num2str(yTicksReverse'))' % set reversed index to figure
set(gca, 'YDir', 'reverse'); % flip image, along with the y axis.
ax = gca;
ax.YAxis.Exponent = 6;
</pre><p>After this code is run, looking at the ax.YAxis values does show that the exponent assignment has been set to 6, however it does not change on the figure itself :(</p>David Pyleshttps://de.mathworks.com/matlabcentral/profile/authors/4512731-david-pylestag:de.mathworks.com,2005:Question/3505452017-07-27T17:58:14Z2017-07-27T17:58:14Zis it possible to show power flow direction in real time like PowerWorld software in Simulink?<p>is it possible to make an interface with PowerWorld software with MATLAM/Simulink? I wants to see the flow direction in real time same as PowerWorld in simulink. Beacuse OPAL_RT Real Time simulator can only work on Simulink environment</p>Subrinahttps://de.mathworks.com/matlabcentral/profile/authors/5793209-subrina