Answered
Change color of double quoted strings MATLAB
Based on your comment to my comment ... Take a look at Setting --> Editor/Debugger --> Language. There is a pull-down menu ther...

3 years ago | 0

Answered
Determine function from Poisson PDF with lambda < 1
It is not accurate to say "one would need at least 1 'event' to make sense of a Poisson distribution". The events can be very ra...

3 years ago | 0

| accepted

Answered
multiple comparisons test figure object selection
The only way I could see to do this is to set the control type to "dunnett", and set the control group. load carsmall [p,t,sta...

3 years ago | 0

Answered
How to change consecutive duplicate values, so that they are unique
If the answer to all of my question in my above comments are "yes", then % Input A = [1,2,2,4,5,5,5,6]; % Algorithm B = A;...

3 years ago | 0

| accepted

Answered
Solving for the parameters of a distribution
Using the formula for the CDF, from the Wikipedia page that @Torsten referenced: syms mu sig x1 = 217800; x2 = 1250000; ...

3 years ago | 0

| accepted

Answered
How to sample uniformly elements on a matrix and store the location information , i.e, (i,j) i-th row and j-th col , in a data type like list in Python?
This is easiest using linear indexing. (See the section on linear indexing on this page, for example.) % Input matrix M = magi...

3 years ago | 0

Answered
nanmean giving nansum output
That's not the help I get for nanmean (in the Statistics and Machine Learning Toolbox). Looks like there is a nanmean in the Fin...

3 years ago | 0

| accepted

Answered
Is there a function to determine the non-exceedance probability of each value in the table?
Using info from your near-duplicate of this question: Table = readtable("https://www.mathworks.com/matlabcentral/answers/upload...

3 years ago | 0

| accepted

Answered
Not enough input arguments for an anonymous function.
I think you probably wanted to raise to the power element-wise, so I changed your function to g = @(x,k) exp(cos(x)).^k; But t...

3 years ago | 0

Answered
Dwonloading previous MATLAB version
Select the release you want from the left-hand side of the Downloads page.

3 years ago | 0

Answered
if statement inside of a Function is working only in certain conditions
This statement if (mask1==1) checks if all elements of mask1 are equal to 1, and executes the next line once if they are. It i...

3 years ago | 2

Answered
How may I split a matrix into two based on 0/1 of the first column?
M = [0 1 3 0 2 2 0 3 5 1 1 4 1 2 9 1 3 8 1 4 5 1 5 3 0 1 2 0 2 1 1 1 7 1 ...

3 years ago | 0

| accepted

Question


String array of the letters of the alphabet
Is there a compact way to generate a string array with the letters of the English alphabet? alphabet = ["a","b", .., "z"]

3 years ago | 2 answers | 0

2

answers

Answered
bar3 but bars on edge of increments
You presumably used the (x,y) values of (11,31) to put the bar there. Instead, offset that by 0.5. Here is a simpler example: ...

3 years ago | 0

| accepted

Answered
How to separate two matrices from a single matrice?
Here is one way: % Inputs A = [ 1 2 3 5 6 7 8 9 10]; index_1 = [2,4,6,8]; index_2 = [1,3,5,9]; % Get ...

3 years ago | 0

| accepted

Answered
Help me understand imhist, I have to recreate it in Python
The difference is in the details of how the bins are defined. The formula for the upper and lower limits of the bins is in the T...

3 years ago | 1

| accepted

Answered
line vs. plot for plotting data
I would be confident that the difference is intentional, based on the two documentation pages for the primitive line and the cha...

3 years ago | 1

| accepted

Answered
Zero inflated poisson regression model for multilevel data in matlab.
I am not aware of any way to do this analysis using built-in MATLAB functions. Google search turns up this File Exchange submiss...

3 years ago | 1

| accepted

Answered
How to save a Figure to a PNG File
According to the documentation for saveas, you should be able to do saveas(gcf,'CompileData.png') If that doesn't work, then y...

3 years ago | 0

| accepted

Answered
How fitlm computes confidence bounds?
Yes, the coefCI property of the model object output from fitlm gives the 95th percentile confidence intervals of the fitted coef...

3 years ago | 0

Answered
recessionplot function using recession dates for a country other than USA
% Pull data and plot an example from recessionplot documentation load Data_CreditDefaults X = Data(:,1:4); T = numel(dates); ...

3 years ago | 1

| accepted

Answered
i don't know why the legend doesn't take the same type of line that simulated , for example if dashed line used , so the legend should be dashed also ?
The problem is what @Voss described. Here, I've removed your legend completely. When you use the plot() function with a cfit obj...

3 years ago | 0

Answered
Create a figure with the same x-axis on top and bottom, and y-axis on the left and right.
Based on your comment on my other solution, here is a different guess as to what you mean. (I'm still not really sure.) This co...

3 years ago | 0

Answered
Create a figure with the same x-axis on top and bottom, and y-axis on the left and right.
I am not entirely sure I understand everything you want. But, borrowing from this answer, here is code that will label ticks on ...

3 years ago | 0

Answered
Type of t-statistic returned by mnrfit for an ordinal model?
The t-statistic does not have "tailedness". It is a ratio of the effect coefficient to the standard error. One might use the t-...

3 years ago | 2

| accepted

Answered
Do "pointers" exist in MATLAB? A question about the efficiency of using shorthands.
In general, MATLAB will not allocate new memory until it needs to, and will just use the same "array reference" to memory. See H...

3 years ago | 0

| accepted

Answered
How can I create a matrix that contains number and text without using the cell array?
The MATLAB table data type is probably the best for this. Then, how you choose to export the data from MATLAB will also be impo...

3 years ago | 0

Answered
How do I create a table and add a row of text from an existing matrix?
% Pull the data as a table (even though we are only going to use it to get the header row) tbl = readtable("TestFile.xlsx"); ...

3 years ago | 0

Answered
searching for the particular point value from the two different data sets
Without more detail about how your dataset is structured (e.g. do you have two vectors, or arrays, or tables?), it is not possib...

3 years ago | 0

Answered
Randsample with matrix: extract multiple values from every column of a matrix without loop!
Here is a pretty obfuscated one-liner, but I think it does what you want, and should be fast: % Your data z_k = 2; pV= [0.552...

3 years ago | 0

| accepted

Load more