Answered
catch.ME returns incorrect line number for error
"....except returning correct line number where error occured." When MATLAB throws an error in the try section of a try, catch ...

2 years ago | 0

| accepted

Answered
Counting the amount of times a specific error appears
It would be easier to be sure solve the problem if you would attach a sample file, but... ... % Get a list of all files in the...

2 years ago | 0

Answered
Plot multiple values in a single bar in bar plot
bar can't do that alll by itself without some help, but one can coerce things into what (I think) you asked for...comments in li...

2 years ago | 1

Answered
Avoid negative sign with compose() when output is zero, e.g. '-0' or '-0.0'
num = -0.04; fprintf('%.1f\n', num) This is the normal and expected behavior when the value is rounded because it IS negative....

2 years ago | 1

Answered
Suppress uitable cell borders
No. The only user-settable style properies are those accessible via uistyle which does not include a borders property. Could b...

2 years ago | 0

| accepted

Answered
Data (.csv) extraction issue using "readtable"
d=dir('*.csv'); % get the file names so don't have to code individually for i=1:numel(d) ...

2 years ago | 1

Answered
Different X axis location. Unsure Why.
set(0, "DefaultAxesFontName", "Courier New"); set(0, "DefaultTextFontName", "Courier New"); Raman = readtable("Ufile5.csv"); ...

2 years ago | 0

Answered
How to align position of titles in subplots?
for i=1:15 hAx(i)=subplot(5,3,i); plot(rand(10,1)) title(num2str(i,'Figure %d')) %hAx(i).TitleHorizontalAlignment='l...

2 years ago | 0

| accepted

Answered
Using 3 "y" axes for multiple plot
ombre_excel = 'Hoja_fuente.xlsx'; datos = readtable (nombre_excel); datos.Properties.VariableNames=strrep(datos.Properties.Var...

2 years ago | 1

| accepted

Answered
How can I filter a FFt signal to only show the main frequency?
Your signal is really quite short so it's hard to do too much about averaging other than using overlap, but the easy way of roun...

2 years ago | 0

| accepted

Answered
Keeping the scale in subplots when one is changed
%% PLOT FOR INTERFACE EARTHQUAKES fsz=10; % 25 is way too big color_text=[0.09 0.27 0.68]; figure...

2 years ago | 0

Answered
how to add geoplot scatter plot custom icon overlays?
lat = [37.7749, 34.0522, 40.7128]; % San Francisco, Los Angeles, New York lon = [-122.4194, -118.2437, -74.0060]; % Create ...

2 years ago | 0

Answered
Finding out the missing dates and times from the time series data
tD=readtable('data.txt'); % read the file head(tD,15) % see what it contains tD.Properties.Variable...

2 years ago | 1

Answered
How to plot combined surf and 2d plot
To amplify on previous to incorporate the larger range and still compute over a fine mesh in ROI. I converted the former Answer...

2 years ago | 0

| accepted

Answered
How change the shape of plot ?
[X,Y,Z] = peaks(25); surfc(X,Y,Z) hold on hAx(1)=gca; pos=hAx(1).Position; wh=diff(reshape(pos,2,[]).'); w=wh(1); h=wh(2); ...

2 years ago | 1

Answered
Ability to select and change figure objects similar to what plotedit does, but that can be compiled into an executable.
You would have to write your own plotedit functionality via using the <ButtonDownFcn> callback for the line or text objects of i...

2 years ago | 0

Answered
I have a problem with the movement of a pawn by two fields in its first move does anyone have a suggestion for a solution
You'll need to keep a state variable for each that indicates when it has yet to be moved...or, alternatively, you can always che...

2 years ago | 0

Answered
In 3D bar plot, my Ylabel is partially shown in the figure. Please help me such that the ylabel gets shown fully in the 3D graph.
% Change default axes fonts. set(0,'DefaultAxesFontName', 'Times New Roman') set(0,'DefaultAxesFontSize', 21) % Change defaul...

2 years ago | 0

| accepted

Answered
Plot vertical curves on top of a 2D heat map
L=40*membrane(1,25); imagesc(L) xline(fix(width(L)/2),'r-','linewidth',2) Seems to work to put a vertical line on top of an i...

2 years ago | 1

| accepted

Answered
Tiling stacks of boxplots. Each stack contains 5 boxplots
This duplicates the prior work with a table instead; the previous still is correct for the one vector case, but having the data ...

2 years ago | 0

| accepted

Answered
Tiling stacks of boxplots. Each stack contains 5 boxplots
tT=readtable('test.xlsx'); whos tT [head(tT,4); tail(tT,4)] sum(~isfinite(tT{:,:})) Those data look nothing like the prior e...

2 years ago | 0

Answered
Tiling stacks of boxplots. Each stack contains 5 boxplots
That would just double the number of rows in the subplot (or tiledlayout) arrangement... y=randn(100,5).*[3 2 3 4 3]+[30 20 25 ...

2 years ago | 0

Answered
Select year in timetable
"How do I get the list of years in TR?" A timerange object is opaque; there are no user functions to query one; it can only dir...

2 years ago | 0

| accepted

Answered
sheetnames() leaves Excel file locked?
Well, it turned out to be pilot error, after all! I need to also pick a formula from the template file so the sheet would rem...

2 years ago | 0

Question


sheetnames() leaves Excel file locked?
In a debugging session, something seemingly bizarre occurred -- function is to create an Excel sheet for import into another pro...

2 years ago | 2 answers | 0

2

answers

Answered
How to get a scalar from MATLAB
A=[1:50]; B=[1:50]; rp1=A*B' Matrix multiplication is defined such that the resultant matrix is the size of the outer dimensi...

2 years ago | 0

Answered
Can the random function accommodate the randi function?
random('unid',2,[1,10])-1 nnz(ans) which -all random which -all rand which -all randi The deal is that random is only avail...

2 years ago | 2

Answered
I encountered an 'invalid use of operator' error message.
load(fullfile('E:\charite\Data\EGCG_Round3\MRE\MouseAtlasReg\ProcessedShort\20241024_sl_MRE_Day18_Cage1_3505_MRE\mreCubes1','ven...

2 years ago | 0

Answered
Read first lines of txt files with textread
N=3; field=textread(file,'%s',N,'delimiter',newline,'whitespace',''); See textread for details of syntax including that all in...

2 years ago | 0

Answered
Question about the syntax of a MATLIB code line creating one array from another
Well, what happens if you run the code as written? It's hard to tell for sure without the actual code in situ, but from the des...

2 years ago | 0

| accepted

Load more