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 ...

2 months 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:...

2 months 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.

2 months 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...

2 months 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')

2 months 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" ...

3 months 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....

3 months 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...

3 months 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...

3 months 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 = ...

3 months 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...

3 months 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);

3 months 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....

3 months 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 ...

3 months 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);

3 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 <...

3 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.

4 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...

4 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...

4 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...

4 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...

4 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...

4 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...

4 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...

4 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.

5 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...

5 months ago | 0

| accepted

Answered

Generate correlated random variables in a wider domain

It looks like 3.15 and 3.4 are the maximum values in the generalized extreme value and pareto distributions with the parameters ...

Generate correlated random variables in a wider domain

It looks like 3.15 and 3.4 are the maximum values in the generalized extreme value and pareto distributions with the parameters ...

5 months ago | 0

Answered

Weibull fit to interval censored data

You can do this with Cupid. Here is an example: % Generate some truncated Weibull data just to have an example % of some data ...

Weibull fit to interval censored data

You can do this with Cupid. Here is an example: % Generate some truncated Weibull data just to have an example % of some data ...

6 months ago | 0

Answered

Efficient code for obtaining the probability of X or less, when the PDF is known, but the CDF cannot be expressed precisely

Unless you have closed form or a good approximation to the CDF, it seems like your only option is to integrate the PDF with MATL...

Efficient code for obtaining the probability of X or less, when the PDF is known, but the CDF cannot be expressed precisely

Unless you have closed form or a good approximation to the CDF, it seems like your only option is to integrate the PDF with MATL...

6 months ago | 1