Answered
How to transparent histogram or mix colors of different histograms
Set the FaceAlpha and EdgeAlpha values to something like 0.5. The reason you're not seeing any transparency even though you're ...

6 years ago | 1

| accepted

Answered
How can I save UIAxes as an image when button is pushed in app designer?
The code you shared shows that you're exporting the children of a UIAxes onto a regular axis. That can be done with copyUIAxe...

6 years ago | 0

Answered
I want to implement an end point detection for a tall spike in a sound signal
"only one should be the true "tall" peak (the first peak read in the data)" Are you sure about that? That's this peak in the da...

6 years ago | 1

| accepted

Answered
Error using cross validation with plsregress
Based on the results of which crossval -all a function with the same name from a 3rd party toolbox (pls toolbox) is shadowing...

6 years ago | 0

| accepted

Answered
"Array indices must be positive integers or logical values."
If this is the complete script, the error is caused in this line where i is not defined and therefore takes the default value of...

6 years ago | 0

| accepted

Answered
how can I plot 800 samples in a percentage cicle from 0 to 100% on x axis?
If you wanted to normalize the X values (Sp) so that they span from 0 to 100, SpNorm = (Sp-min(Sp))./range(Sp)*100; plot(SpN...

6 years ago | 0

| accepted

Answered
Is there a way to return the status of writetable, writematrix, or writecell?
"Is there a way to return the status of writetable, writematrix, or writecell?" No. But there are workarounds depending on how...

6 years ago | 0

| accepted

Answered
how can i declare a variable in a function for the first time only ,
I think this is what you're looking for, function h=src(input) persistent output %%%%%%%% if isempty(output) ...

6 years ago | 1

| accepted

Answered
decreasing three loops to two loops with sum
----------- Updated answer ------------------------------ Vectorize the k-loop and use sum() to define theta2. thetao=1; alfa...

6 years ago | 0

| accepted

Answered
error: Index in position 2 exceeds array bounds (must not exceed 2).
The error is happening here squeeze(V0_1(ik2, iter+1)') % or, V0_1( 1 , 15 ) V0_1 is 101 x 2. iter is equal to 14 on th...

6 years ago | 0

| accepted

Answered
How do I change the font size of the axes in a stacked plot?
Use the stackedplot handle. h = stackedplot(T); h.FontSize = 12; % or set(h, 'FontSize', 12) If you don't have access...

6 years ago | 1

Answered
How could I read Index number of a third column matrix using elements of first two matrices and write them as a row matrix?
Use logical indexing which is similar to what you're already doing but without the find(). That way all of the index vectors wil...

6 years ago | 0

Answered
Index months in timetable
Logical index of rows that are in July,Aug,Sept. idx = ismember(month(TT2_staLCA_WS.Time),[7,8,9]);

6 years ago | 0

| accepted

Answered
Legend Positioning in Tiled Chart Layout
" MATLAB 2019b ... has locked the 'Position' property of the legend when usend in a tiled chart." Yes, that's correct. Starti...

6 years ago | 3

Answered
How can I create a function that converts the number of a month to the name of a month?
No need to create a function for that. Monthnumber = 4; M = month(datetime(1, Monthnumber, 1), 'Name') % also try 'shortname...

6 years ago | 0

Answered
Creating Table from Cell Array Data
The first version in your question doesn't work because "names" contain 3 VariableNames that are all "Bin1" so when you assign t...

6 years ago | 1

| accepted

Answered
How can I pass a variable between a m-file and another m-file that runs a gui?
M files can contain scripts or functions but variables can only be passed to functions so the m-file must be written as a functi...

6 years ago | 0

| accepted

Answered
How do i create a colour quiver plot (colquiver) on top of a pcolor depth map?
"How can I ... use 2 colourmaps and have 2 colourbars?" An axis can have more than 1 colorbar but it cannot have more than 1 co...

6 years ago | 1

| accepted

Answered
Velocity vector plot with empty cell array
We can't run your code due to missing variables but here are two general suggestions. Before before we get to that, always p...

6 years ago | 1

Answered
Inner matrix dimensions must agree error message,
You can either perform element-wise multiplication with implicit expansion x(:,i) - inv(H(x(:, i)) .* J(x(:,i))) % ...

6 years ago | 1

| accepted

Answered
Undefined function 'subtitle' for input arguments of type 'char'.
Fast forwarding 3.5 years to the r2020b release, now there is a function named subtitle that sets a subtitle under the main titl...

6 years ago | 1

Answered
graph subtitle?
Starting in r2020b, you can add a title and subtitle using [t,s]=title('myTitle','mySubtitle') or t = title('myTitle'); s...

6 years ago | 1

Discussion


New in r2020b: Subtitles & Title/Label Alignment
<</matlabcentral/discussions/uploaded_files/1744/mainImg.png>> *Add a subtitle* Multi-lined titles have been supported for...

6 years ago | 15

Answered
How can I change the code to get this plot?
Key points. Use scatter() instead of plot() so you can control individual marker size. Scale the radii values ('r') to a rang...

6 years ago | 0

| accepted

Answered
Passing an UIAxes handle to PlotFcn
tl;dr use the OutputFcn method below. Using a custom optimplotfval "I would like to make the 'optimplotfval' function to plot...

6 years ago | 2

| accepted

Answered
how to give title and axes in histfit?
You have a variable in your workspace named xlabel. Rename that variable. Example of this error: xlabel = 'apples'; xlab...

6 years ago | 0

| accepted

Answered
Convert variable to numeric in TimeTable
Convert your columns containing cellstrings to numeric vectors. Example: TT1_sta.Var2 = str2double(TT1_sta.Var2); repeat fo...

6 years ago | 1

| accepted

Answered
plot 4 plots on 3 axes
If the x-values, F{1}, F{2}, V{1}, and Z{1}, are all on different scales that cannot be rescaled to share a single scale, the pl...

6 years ago | 0

Answered
Automatically naming mat files with variable names
Use fullfile to define the full path and file name. destination = 'H:\My_Directory\Mat_Files'; filename = fullfile(destinatio...

6 years ago | 0

Answered
Set aspect ratio in tilelayout
You either need to apply the settings after plotting the data or you need to execute "hold on" after applying the settings, befo...

6 years ago | 1

| accepted

Load more