Answered

Help fitting data to an implicit equation

I would suggest using fminsearch. The error function to be minimized would be something like: function thiserr = err(x,y,t) ...

Help fitting data to an implicit equation

I would suggest using fminsearch. The error function to be minimized would be something like: function thiserr = err(x,y,t) ...

3 days ago | 0

| accepted

Answered

Chi-squared for multiple groups

The crosstab function will do this--it is not limited to 2x2 tables. Example: % Make up example data for 200 participants, codi...

Chi-squared for multiple groups

The crosstab function will do this--it is not limited to 2x2 tables. Example: % Make up example data for 200 participants, codi...

3 days ago | 0

Answered

using mle in matlab

One problem is that mle's search function (fminsearch) may try negative parameter values, in which case your pdf function return...

using mle in matlab

One problem is that mle's search function (fminsearch) may try negative parameter values, in which case your pdf function return...

4 days ago | 0

Answered

ttest2 with a group describing independent values (statistics)

No, it is not possible to use ttest2 as you suggest. Your design has 2 factors: gender and time (day/night) with repeated measu...

ttest2 with a group describing independent values (statistics)

No, it is not possible to use ttest2 as you suggest. Your design has 2 factors: gender and time (day/night) with repeated measu...

13 days ago | 1

| accepted

Answered

Generation of Conditional Random Variables

It sounds like the only "free" aspect of your new samples is the new total (say, 241 instead of 240). Once you have that new to...

Generation of Conditional Random Variables

It sounds like the only "free" aspect of your new samples is the new total (say, 241 instead of 240). Once you have that new to...

14 days ago | 1

Answered

Calculate Nakagami m parameter using the mle function

I think the minimum change you need is fast_fading=fast_fading(filtersize:end); fast_fading = fast_fading - min(fast_fading); ...

Calculate Nakagami m parameter using the mle function

I think the minimum change you need is fast_fading=fast_fading(filtersize:end); fast_fading = fast_fading - min(fast_fading); ...

15 days ago | 0

Answered

Mixed anova design function (unbalanced design)

If the goal of the analysis is to see if the two groups differ significantly in sleep pre-expt, then actually the simplest appro...

Mixed anova design function (unbalanced design)

If the goal of the analysis is to see if the two groups differ significantly in sleep pre-expt, then actually the simplest appro...

17 days ago | 0

Answered

model parameter estimation from RMSE between modeled outputs and observations

Something like this. If it is too slow, note that you can use 'optimset' to pass fminsearch options that make it finish faster ...

model parameter estimation from RMSE between modeled outputs and observations

Something like this. If it is too slow, note that you can use 'optimset' to pass fminsearch options that make it finish faster ...

23 days ago | 0

Answered

model parameter estimation from RMSE between modeled outputs and observations

I assume the model is too complex for regression, etc. In that case, you might be able to do this with fminsearch, if there are...

model parameter estimation from RMSE between modeled outputs and observations

I assume the model is too complex for regression, etc. In that case, you might be able to do this with fminsearch, if there are...

26 days ago | 0

Answered

Linear model fit error

Use the transpose operator on x1, x2, x3 and y so that these are column variables, like this for x1: x1 = [7 8 7 8 7 8 7 8 7 8 ...

Linear model fit error

Use the transpose operator on x1, x2, x3 and y so that these are column variables, like this for x1: x1 = [7 8 7 8 7 8 7 8 7 8 ...

1 month ago | 0

Answered

Randi Error- Array exceeds max array size preference

This looks wrong: OOK=randi(1,sig_length); The first parameter (here, 1) is the maximum random integer (the minimum is 1). Si...

Randi Error- Array exceeds max array size preference

This looks wrong: OOK=randi(1,sig_length); The first parameter (here, 1) is the maximum random integer (the minimum is 1). Si...

1 month ago | 0

| accepted

Answered

repeated measure anova two options

Not sure but I think you need T = table([1 2]','VariableNames',{'Time'}); T.Time = categorical(T.Time); % add this line Mayb...

repeated measure anova two options

Not sure but I think you need T = table([1 2]','VariableNames',{'Time'}); T.Time = categorical(T.Time); % add this line Mayb...

1 month ago | 0

Answered

What kind of join will work to merge these two tables

Try T3 = join(T1,T2,'Keys','City')

What kind of join will work to merge these two tables

Try T3 = join(T1,T2,'Keys','City')

1 month ago | 0

| accepted

Answered

derive new variable with random float values using for loop

Despite your comments, I guess you want 0-1 for the second option, not 0-2. I guess you want all numbers in the range to be equ...

derive new variable with random float values using for loop

Despite your comments, I guess you want 0-1 for the second option, not 0-2. I guess you want all numbers in the range to be equ...

1 month ago | 0

| accepted

Answered

Plot best-fit Spearman rank correlation curve

Tricky question, because the whole point of the Spearman correlation is that the x/y relationship might be nonlinear. Maybe use...

Plot best-fit Spearman rank correlation curve

Tricky question, because the whole point of the Spearman correlation is that the x/y relationship might be nonlinear. Maybe use...

1 month ago | 0

Answered

fitting a Gaussian curve convoluted with exponential decay

It sounds like you want what is often called the "ex-Gaussian" distribution. Its density function is on Wikipedia. Cupid will ...

fitting a Gaussian curve convoluted with exponential decay

It sounds like you want what is often called the "ex-Gaussian" distribution. Its density function is on Wikipedia. Cupid will ...

1 month ago | 0

| accepted

Answered

get discrete pdf/pmf from a kernel distribution pdf on an interval

myFitTrunc = truncate(myFit1,4,12) % 4, 12 are example lower,upper truncation bounds Y = random(myFitTrunc,500,1) histogram(Y...

get discrete pdf/pmf from a kernel distribution pdf on an interval

myFitTrunc = truncate(myFit1,4,12) % 4, 12 are example lower,upper truncation bounds Y = random(myFitTrunc,500,1) histogram(Y...

1 month ago | 0

| accepted

Answered

Optimising Monte Carlo simulation

Some suggestions--hopefully not a waste of your time: Use the profiler to find out where time is spent, so you can focus your s...

Optimising Monte Carlo simulation

Some suggestions--hopefully not a waste of your time: Use the profiler to find out where time is spent, so you can focus your s...

1 month ago | 1

Answered

RMSE plot of Monte Carlo simulation

RMSE is not supposed to decrease with the number of iterations, but it should stabilize. Your plot oscillates because each poin...

RMSE plot of Monte Carlo simulation

RMSE is not supposed to decrease with the number of iterations, but it should stabilize. Your plot oscillates because each poin...

2 months ago | 1

| accepted

Answered

Outliers in ANOVA and multcompare

Yes, outliers are included. (Scores are considered outliers only for the purposes of the boxplots.) The way you can tell is tha...

Outliers in ANOVA and multcompare

Yes, outliers are included. (Scores are considered outliers only for the purposes of the boxplots.) The way you can tell is tha...

2 months ago | 0

Answered

Average of Column Values with Condition

if your data are in a table, maybe you can use grpstats something like this: tbl.IntDepth = trunc(tbl.depth); % assuming depth...

Average of Column Values with Condition

if your data are in a table, maybe you can use grpstats something like this: tbl.IntDepth = trunc(tbl.depth); % assuming depth...

2 months ago | 0

Answered

2-way-anova with balance over subjects

Look here for an explanation of how to do a repeated measures ANOVA with the same 2x2 within-Ss structure.

2-way-anova with balance over subjects

Look here for an explanation of how to do a repeated measures ANOVA with the same 2x2 within-Ss structure.

2 months ago | 0

| accepted

Answered

How to choose a sample of these input permutations?

Here's one possibility: Start by making a histogram of the "Difference in VAF" (DVAF) scores. Divide this histogram into k equ...

How to choose a sample of these input permutations?

Here's one possibility: Start by making a histogram of the "Difference in VAF" (DVAF) scores. Divide this histogram into k equ...

2 months ago | 0

| accepted

Answered

Defining class methods in the "deeper levels" of a class

A toy example might be needed to make it clearer what you are after, but I guess you want a class A which has as two of its prop...

Defining class methods in the "deeper levels" of a class

A toy example might be needed to make it clearer what you are after, but I guess you want a class A which has as two of its prop...

2 months ago | 0

Answered

Kahneman's Taxi problem

Generate a cab of one color or the other with the appropriate probabilities. Get the color ID response from the witness with th...

Kahneman's Taxi problem

Generate a cab of one color or the other with the appropriate probabilities. Get the color ID response from the witness with th...

2 months ago | 0

| accepted

Answered

Generate a random matrix with 4 specifik values

maybe this? j = 2.5; % insert whatever value of j you want to use vals = [1,-1, j, -j]; pos = randi(numel(vals),15,10^5); r...

Generate a random matrix with 4 specifik values

maybe this? j = 2.5; % insert whatever value of j you want to use vals = [1,-1, j, -j]; pos = randi(numel(vals),15,10^5); r...

2 months ago | 0

Answered

Error when running a repeated measures ANOVA

I'm pretty sure fitrm expects all of the data from a single patient to be on one row of the input data table (e.g., words)--at l...

Error when running a repeated measures ANOVA

I'm pretty sure fitrm expects all of the data from a single patient to be on one row of the input data table (e.g., words)--at l...

2 months ago | 0

| accepted

Answered

Error when calling a jupyter notebook file from matlab

Just guessing here, but given that it is a file not found error, maybe you need to specify the path to the input file, something...

Error when calling a jupyter notebook file from matlab

Just guessing here, but given that it is a file not found error, maybe you need to specify the path to the input file, something...

2 months ago | 0

Answered

Several questions regarding distributions

I don't know that there are definitive answers to any of your questions, but here are some thoughts: > most of these distributi...

Several questions regarding distributions

I don't know that there are definitive answers to any of your questions, but here are some thoughts: > most of these distributi...

2 months ago | 1

Answered

Multiple functions inside one .m file

Try the method involving static classes, as explained here by per isakson

Multiple functions inside one .m file

Try the method involving static classes, as explained here by per isakson

3 months ago | 0

| accepted