Answered

How to plot a mixed density function?

x=-6:.01:10; pdf1 = normpdf(x,1,1); pdf2 = normpdf(x,4,1); mixpdf = 0.5*pdf1 + 0.5*pdf2; figure; plot(x,mixpdf);

How to plot a mixed density function?

x=-6:.01:10; pdf1 = normpdf(x,1,1); pdf2 = normpdf(x,4,1); mixpdf = 0.5*pdf1 + 0.5*pdf2; figure; plot(x,mixpdf);

15 hours ago | 0

Answered

How to load the letter and their log probabilities in database.txt into our program?

This function on FileExchange simply returns a long list of all the numbers in the file. Since it looks like your file has the ...

How to load the letter and their log probabilities in database.txt into our program?

This function on FileExchange simply returns a long list of all the numbers in the file. Since it looks like your file has the ...

3 days ago | 0

Answered

ranova(rm) ranovatbl contains only NaN values and zero's

> 'WithinDesign', Meas This doesn't look right with Meas only having one possibility. Try removing that. > all data are fro...

ranova(rm) ranovatbl contains only NaN values and zero's

> 'WithinDesign', Meas This doesn't look right with Meas only having one possibility. Try removing that. > all data are fro...

7 days ago | 0

| accepted

Answered

How to fit complicated function with 3 fitting parameters using Least square regression

I assume you have vectors of values for V and J, in which case fminsearch might be a good choice. The basic steps are: Write ...

How to fit complicated function with 3 fitting parameters using Least square regression

I assume you have vectors of values for V and J, in which case fminsearch might be a good choice. The basic steps are: Write ...

12 days ago | 0

Answered

How to carry out a chi-squared distribution fit?

chi2gof is not the function you want here--it is for an entirely different purpose. The last few lines should be something like:...

How to carry out a chi-squared distribution fit?

chi2gof is not the function you want here--it is for an entirely different purpose. The last few lines should be something like:...

13 days ago | 0

| accepted

Answered

P-value of a fitted distribution to observation?

kstest does return a p value as the second output. Maybe you are supposed to report that.

P-value of a fitted distribution to observation?

kstest does return a p value as the second output. Maybe you are supposed to report that.

20 days ago | 0

Answered

performing logistic regression with categorical predictors

This message likely means that two or more of your predictors are redundant. For example, two of the numerical X predictors mig...

performing logistic regression with categorical predictors

This message likely means that two or more of your predictors are redundant. For example, two of the numerical X predictors mig...

20 days ago | 0

Answered

sampling error from a truncated normal distribution

Change the histogram line to this: histogram(d_tnorm,30,'Normalization','pdf')

sampling error from a truncated normal distribution

Change the histogram line to this: histogram(d_tnorm,30,'Normalization','pdf')

22 days ago | 0

Answered

How do I share variables between files in a project?

While not the best programming practice, a quick and dirty solution for your situation might be to return a "global-substitute" ...

How do I share variables between files in a project?

While not the best programming practice, a quick and dirty solution for your situation might be to return a "global-substitute" ...

24 days ago | 0

Answered

Regression of log normal data

Take the log transformation of the data and then it will have a normal distribution. Do the regression on the transformed data....

Regression of log normal data

Take the log transformation of the data and then it will have a normal distribution. Do the regression on the transformed data....

26 days ago | 1

Answered

How to find the turning point from noisy data

A few ideas: Form a template for the increasing-then-decreasing shape you are looking for, maybe about 50 units wide along your...

How to find the turning point from noisy data

A few ideas: Form a template for the increasing-then-decreasing shape you are looking for, maybe about 50 units wide along your...

26 days ago | 0

Answered

Running an .EXE file with an Input file with a command via matlab

sprintf might be overkill here. Maybe just: status = system('file.exe ab.txt') If file.exe is not on the Windows path, you mi...

Running an .EXE file with an Input file with a command via matlab

sprintf might be overkill here. Maybe just: status = system('file.exe ab.txt') If file.exe is not on the Windows path, you mi...

29 days ago | 0

Answered

How perform bootstrap balanced resampling of a dataset?

I'm not sure...is this what you want? N = 7; % Small values of N an d K to make it easier to see what it does. K = 5; data = ...

How perform bootstrap balanced resampling of a dataset?

I'm not sure...is this what you want? N = 7; % Small values of N an d K to make it easier to see what it does. K = 5; data = ...

30 days ago | 0

| accepted

Answered

Inverse Cumulative Distribution Function for a Custom PDF.

If you have the custom PDF function (call it custPDF), then you can compute the custom CDF function something like this: functi...

Inverse Cumulative Distribution Function for a Custom PDF.

If you have the custom PDF function (call it custPDF), then you can compute the custom CDF function something like this: functi...

1 month ago | 0

| accepted

Answered

How do I access entries in a table that match a string?

This should work: wantedRows = ismember(A.ProxID,nameFolds); wantedZones = A.zone(wantedRows);

How do I access entries in a table that match a string?

This should work: wantedRows = ismember(A.ProxID,nameFolds); wantedZones = A.zone(wantedRows);

1 month ago | 0

| accepted

Answered

Sum Squared Errors for 3 parameters

It looks like your X2 and X3 'for' loops aren't doing anything, since there is no code between their 'for' and 'end' statements....

Sum Squared Errors for 3 parameters

It looks like your X2 and X3 'for' loops aren't doing anything, since there is no code between their 'for' and 'end' statements....

1 month ago | 0

Answered

Two-way repeated measures fitrm error

You seem to have only two scores for each participant, M(:,1) and M(:,2), in which case you can find out whether the test means ...

Two-way repeated measures fitrm error

You seem to have only two scores for each participant, M(:,1) and M(:,2), in which case you can find out whether the test means ...

1 month ago | 0

Answered

Nested function in optimisation

Is this what you are trying to compute? PitchRAO = exp(PitchLogRAO);

Nested function in optimisation

Is this what you are trying to compute? PitchRAO = exp(PitchLogRAO);

2 months ago | 0

Answered

Defining a parameter which depends on image luminance distribution function?

If I understand you correctly, I think you want this: L = quantile(B,0.1); if L <= 50 alpha = 0; elseif L >= 50 && L <...

Defining a parameter which depends on image luminance distribution function?

If I understand you correctly, I think you want this: L = quantile(B,0.1); if L <= 50 alpha = 0; elseif L >= 50 && L <...

2 months ago | 0

Answered

How to get standard errors from copulafit

You could estimate it by taking bootstrap samples from u.

How to get standard errors from copulafit

You could estimate it by taking bootstrap samples from u.

2 months ago | 0

Answered

Help with linear mixed effects model formula

That model is appropriate if you want to assume these things (in addition to normality, independence, etc): (a) subjects diff...

Help with linear mixed effects model formula

That model is appropriate if you want to assume these things (in addition to normality, independence, etc): (a) subjects diff...

2 months ago | 0

| accepted

Answered

fminsearch and simulated annealing with penalties

It depends a little on exactly what relations you want to impose, but often you can do this by mapping MATLAB's real-number para...

fminsearch and simulated annealing with penalties

It depends a little on exactly what relations you want to impose, but often you can do this by mapping MATLAB's real-number para...

2 months ago | 0

Answered

Converting R code into Matlab code

I think MATLAB has a built-in function that you can use instead of the R for loop. Try just: newSpeed= speed-mean(speed)+33.02...

Converting R code into Matlab code

I think MATLAB has a built-in function that you can use instead of the R for loop. Try just: newSpeed= speed-mean(speed)+33.02...

2 months ago | 0

Answered

fsolve - function with two input arguments

function b = find_b(knownX, knownA, guessForB) fun = @(b) pfun2(knownA,b) - knownX; b = fzero(fun,guessForB); end De...

fsolve - function with two input arguments

function b = find_b(knownX, knownA, guessForB) fun = @(b) pfun2(knownA,b) - knownX; b = fzero(fun,guessForB); end De...

2 months ago | 0

| accepted

Answered

Fit a parameter to minimise a correlation between two vectors

% Some fake data to use in testing: % Presumably you have your own values for these. nExpts = 10; C = rand(nExpts,1); V1 = r...

Fit a parameter to minimise a correlation between two vectors

% Some fake data to use in testing: % Presumably you have your own values for these. nExpts = 10; C = rand(nExpts,1); V1 = r...

2 months ago | 1

Answered

Cascading a User Definable number S Parameter objects together

Maybe this? n = input('Input number of files to be imported & cascaded:\n'); SPara= cell(1,n); for x = 1:n SPara{x} = sp...

Cascading a User Definable number S Parameter objects together

Maybe this? n = input('Input number of files to be imported & cascaded:\n'); SPara= cell(1,n); for x = 1:n SPara{x} = sp...

2 months ago | 0

Answered

Help with finding the average correlation coefficient between a matrix value and its surrounding neighbors?

A correlation isn't designed to measure the similarity between two isolated values, like your given (i,j) element and each of it...

Help with finding the average correlation coefficient between a matrix value and its surrounding neighbors?

A correlation isn't designed to measure the similarity between two isolated values, like your given (i,j) element and each of it...

3 months ago | 1

Answered

calculate a P value using a permutation test

This contribution on file exchange looks like it will do what you want.

calculate a P value using a permutation test

This contribution on file exchange looks like it will do what you want.

3 months ago | 0

Answered

Looping through a large questionnaire set, creating new tables

I hate to say this, but it might be easiest to do a lot of the work in Excel. Note that the data in your screenshot are represe...

Looping through a large questionnaire set, creating new tables

I hate to say this, but it might be easiest to do a lot of the work in Excel. Note that the data in your screenshot are represe...

3 months ago | 0

| accepted