Answered
How to remove labels from a plot?
Text objects are just like any other graphics object. When you create a new text object, store its handle so you can later del...

7 years ago | 0

| accepted

Answered
Find non unique string in a table
nonUnqIdx is a logical index of rows of TT.Alpha that are a repeat (ie, not the first instance). [~, AlphaGroups] = ismember(T...

7 years ago | 1

| accepted

Answered
find the closest point and taking the difference of y coordinates
I recommen using pdist2() to calculate a matrix of distances between all points in A and all points in B. See comments within th...

7 years ago | 0

| accepted

Answered
How to print variable into different rows?
If you just want to display the variables in the command window, merely list the variables without a terminal semicolon which wo...

7 years ago | 0

| accepted

Answered
Sum of cell array Line
% When elements of A are row vectors of the same length % (like the example in the question) s = sum(cell2mat(A{4}.'),1); %...

7 years ago | 0

| accepted

Answered
Why does the length of the tangent line keep changing?
"Why does the length of the tangent line keep changing?" The length is not changing. The reason it appears to change is becaus...

7 years ago | 0

| accepted

Answered
Index from Matching Element in Table
% Get data from UITable UIdata = app.UITable.Data; % Find row of column 1 that matches "jumping" % *note, strcmpi() is not...

7 years ago | 0

| accepted

Answered
I am using R2018b. Why does my graph appear so pixelated?
My bet is that the plot is merely showing your data. Your data appear to be integer values along the y axis so the data will al...

7 years ago | 1

| accepted

Answered
How do I add a shapefile?
(continued from the comments section under the question). The convertStringsToChars() function became available in r2017b. Ch...

7 years ago | 0

Answered
[Help] writetable text alignment and saving pre 0
"By writing a table to excel, it removes pre 0. I mean it saves 0409 to 409. Is there any way to preserve initial zeros?" Numer...

7 years ago | 1

| accepted

Answered
Probability in random numbers!
Use randsrc() randsrc(5,4,[[0,1];[.9,.1]]) % 5 x 4 array % .9 prob. of 0 % .1 prob of 1 *Requires communications toolbox

7 years ago | 0

Answered
Access to files and variables in App Designer
"... I get an error for this Slider component. The error says that I have an undefined variable cell_dicom." Each function has ...

7 years ago | 0

| accepted

Answered
sort and collect data
Assuming you have 3 vectors named sn, pressure, and volume, % Replace every 5th and 6th sn with 0 % * assumes that there will...

7 years ago | 0

| accepted

Answered
how can I check if a specific value in a matrix is an integer?
There are better ways to test for integers. Your method is susceptible to round-off error. It also appears that you forgot the...

7 years ago | 1

Answered
Remove random columns from a big matrix?
If A is 1600 x 8500 as you describe, then the line below will only create 1600 elements so you can't use an index of 1:3000. k...

7 years ago | 0

| accepted

Answered
How to make a cell array of cell arrays
"how can I transform this into a 14x1 cell array for which every cell contains 5 numbers" What you're describing is a cell arra...

7 years ago | 0

| accepted

Answered
Transfering data from GUI to main file
Assign a unique tag to GUI2. This can be done by opening GUI2 in GUIDE, right click on the GUI background, select 'property ins...

7 years ago | 0

| accepted

Answered
Delete axis, keep legend
To create a legend without any visible data using plot(). plot(nan, 'r-', 'DisplayName', 'MyLegendName'); legend(); Note: ...

7 years ago | 1

| accepted

Answered
labelling x and y axis in pole zero map with latex
The handles are deeply buried and undocumented.... h = pzplot(an,'r') xlabel('\%Real Axis, ') h.AxesGrid.XUnits = '\textit{...

7 years ago | 0

| accepted

Answered
Setting desired margins and ratio for plot
"axis equal" will set the aspect ratio equal between both axes. "xlim" and "ylim" will set the axis limits which you can use t...

7 years ago | 3

| accepted

Answered
can anyone help me to figure out what mistake i took ?
counter = 1; while state_values(counter,3)<9*10^-10 counter = counter + 1; end state_values only has n rows (or it's empt...

7 years ago | 0

Answered
Extracting data from a text for further analysis
textChar = fileread('example.txt'); textCell = strsplit(textChar,'\n')'; y = str2num(textCell{11}); x = str2num(textCell...

7 years ago | 0

| accepted

Answered
How to extract a structure from a nested structure
A = S_out(1); ...but if possible, rather than extracting it and using "A", keep the structure array together and just use "S_o...

7 years ago | 0

| accepted

Answered
GUI: How do I hide the plotted data associated with a specific 'hidden' axis
"How do I hide the plotted data associated with a specific 'hidden' axis? " Turn visibility off on the axes and all of its chil...

7 years ago | 2

| accepted

Answered
Why are spaces ignored when a character string is scanned?
"How do I make MATLAB scan the spaces in my character string?" Use the character format spec formatSpec = '%c'; %data type Al...

7 years ago | 0

| accepted

Answered
Sum the values of an matrix
% SU Matrix SU = [1 0 1 0 1 0 1 1 1 0 1 0 0; 0 0 0 1 1 0 0 1 0 1 0 0 0; 1 1 1 0 0 0 0 0 1 1 1 0 0]; % Replace 1 wi...

7 years ago | 0

| accepted

Answered
How insert squares to figure xlabels and reduce text distance?
Why not just use legend? That's what it's designed to do (if I understand your question correctly). %Example cla() b1 = ba...

7 years ago | 0

Answered
App Designer Capabilities - it is nerve-wrecking!
1) "Can I add print to the menubar? You can add anything you want to the menubar. From the AppDesigner interface, drag and d...

7 years ago | 1

| accepted

Answered
why isn't app designer table not sorting?
" I can't get the columnsortable work for a table. Can anyone have a look at this?" According to documentation, "To enable colu...

7 years ago | 1

| accepted

Answered
in matlab 2019a, profiler does not work correctly
It works fine for me (r2019a) when I time the following two lines. t = randi(1000,60,1); plot(1:60,t, 'o') If the "Run and...

7 years ago | 0

Load more