Answered
How to Generate random number that most of them ZEROs
x=zeros(1,50); r=rand(1,50); PrZero = .8; % Adjust as needed to achieve "most of them zeros" x(r<(1-PrZero)/2) = 1; ...

8 years ago | 0

| accepted

Answered
Somewhat lengthy question on distribution fitting
You might be able to do a lot of what you want with the routines here: <https://github.com/milleratotago/Cupid Cupid> To crea...

8 years ago | 0

Answered
Difference between manually fitting data with a distribution and Histfit() function?
"Is it due to the different scaling of y axis for the pdf?" Yes.

8 years ago | 0

| accepted

Answered
Need to find the distribution from mean & standard deviation
As others have said, you should not expect the randomly sampled values to match the true mean and sd exactly, due to random samp...

8 years ago | 0

Answered
How to find inverse of a self written integral function?
No doubt there are more efficient methods for your particular function, but a quick and dirty general approach is to make a func...

8 years ago | 0

| accepted

Answered
how marginal means (also called least square means) and standard deviation are calculated from repeated measure model? I do not have any "groups" in my data, I only have 76 samples each measured in 6 locations (1 location missing in one sample)
With this model I believe the marginal means and standard deviations for the different locations are simply the raw means and st...

8 years ago | 0

| accepted

Submitted


milleratotago/PlotTbl
MATLAB function for plotting data in table

8 years ago | 1 download |

0.0 / 5

Answered
Vary the colour of a plotted curve depending on a third variable.
I've updated PlotTbl and it might do what you want now. You can specify any RGB values you want to correspond to the different ...

8 years ago | 0

Question


How can I get plain text diary files?
I am trying to use diary() to save unit test output in plain text files for later checking. The output is pretty hard to read, t...

8 years ago | 4 answers | 1

4

answers

Answered
Why is the PDF value for my most frequent event the lowest value?
The normal distribution is not a reasonable model for the daily counts that you are accumulating. I think Akira's hint was corr...

8 years ago | 0

Answered
Vary the colour of a plotted curve depending on a third variable.
Maybe <https://au.mathworks.com/matlabcentral/fileexchange/64581-milleratotago-plottbl PlotTbl> will do it for you. From your d...

8 years ago | 0

Answered
Is there any way of extracting raw data from scanned plots of charts with X and Y scales defined on graph paper?
This is not inside MATLAB, but it might be helpful anyway: <https://automeris.io/WebPlotDigitizer/ WebPlotDigitizer>

8 years ago | 0

Answered
get variables from text file
GetNumsInAsciiFile (on FileExchange) will get you one long list of numbers, and then you can put them where you like. Maybe tha...

8 years ago | 0

Question


Is there a better way to write this short function, without the 'for' loop?
function Rows = FindMatchingTableRows(Tbl,VarNames,VarVals) % Find the numbers of the rows in Tbl with the values % give...

8 years ago | 1 answer | 0

1

answer

Answered
Create a pseudo-random array with a set probability of similarity to an existing random array
With such constrained stimulus pairs it might be more straight-forward to generate exactly the pairs you want systematically and...

8 years ago | 0

| accepted

Answered
How to change automatically the name of the title ?
Looks like you need a "figure;" command inside the loop to start a new figure window for each solver. I think you are now drawi...

8 years ago | 0

| accepted

Answered
Fminsearch for fitting models?
Alessandro, it sounds like you are fitting probit models and/or psychometric functions. If so, you might find some very useful ...

8 years ago | 0

Answered
Need help with fprintf
Yes. The basic idea is to use "blanks" to pad out the length of the opponent field on each line to some maximum width that will...

8 years ago | 0

Answered
Removing the zero that precedes the decimal point
Here is a little follow-up in case anyone else has this problem... I had the same problem as z8080, and I wanted to solve it ...

8 years ago | 0

Answered
How to fit imposing some conditions?
If you want to keep the residuals positive, trying building in an extra penalty for negative residuals. In your original model f...

8 years ago | 0

Answered
back-transform rank data
I am not really sure what you are trying to accomplish since you still have the original Data, but maybe this will give what you...

8 years ago | 0

Answered
Creating a table then filling it with data.
How about this: # preallocate arrays to hold y, c, and m before you start the loop # store the values into those arrays as y...

8 years ago | 0

Submitted


GetNumsInAsciiFile(sFName,varargin)
Read the numbers from an ASCII file, ignoring everything else.

8 years ago | 1 download |

5.0 / 5

Answered
Calculation of probability using Beta ,lognormal and weibull distribution
"if I want to obtain the likelihood of getting a particular combination of values which represent these 3 properties of another ...

8 years ago | 0

| accepted

Answered
how to develop a zero inflated weibull distribution in matlab
1. You might replace the zeros with some small nonzero value (e.g., half-way between 0 and the smallest value that can be record...

8 years ago | 0

| accepted

Answered
How to skip (variable) white space using textread
GetNumsInAsciiFile on File Exchange will probably do what you want: <https://au.mathworks.com/matlabcentral/fileexchange/66692-...

8 years ago | 0

| accepted

Answered
How to correctly specify WithinDesign for fitrm
WithinDesign lets you store specific numeric values associated with the levels of the within-Ss factors in the RepeatedMeasuresM...

8 years ago | 2

| accepted

Answered
HOW TO USE Chi Squared Test to test Triangle Distribution?
It sounds like you are expecting h=1 and p<.05 when the fit is good, but that is not the way the test works, but that is backwar...

8 years ago | 0

| accepted

Answered
how can i write t truncated distribution as a likelihood?
Not entirely clear what you are asking. Without looking too closely, your equation looks like the conditional density of x for a...

8 years ago | 0

Answered
Shortening nested If statements
Approximately: GR = [3.78 2.06 1.58 1.21 0.82]; magic_constants = [3.78 2.06 1.58 1.21 0.82]; for i=1:x j =...

8 years ago | 1

| accepted

Load more