Respondida
Randomly select values from a vector that yield a target mean
Well, this is pretty ugly, but you could just repeatedly sample N numbers from AR randomly, stopping when they give you TM. Tha...

alrededor de 8 años hace | 0

Respondida
Matlab PDF testing for integers only
Thanks for your clarification. Well, if adtest, etc, won't let you specify the points at which to examine the distributions (...

alrededor de 8 años hace | 0

Respondida
Fit Experimental Data to a Predetermined Model
If I understand you correctly, you might proceed by trial and error, using different combinations of nstar/hshift until you get ...

alrededor de 8 años hace | 0

Respondida
how to use anonymous functions
x = 1:100; a = [1,5,2.5]; gau = @(x,a)(a(1).*exp(-0.5.*((x-a(2)).^2./a(3).^2))); m1 = gau(x,a)

alrededor de 8 años hace | 1

Respondida
Parfor Loop Help: Classification of Variables
Can't you replace j with idx (and get rid of j=j+1)? The problem is that MATLAB does know which row of amp and loc should recei...

alrededor de 8 años hace | 1

Respondida
How to Create Libraries in Matlab?
Another option is to combine the functions into a single class, making them static functions so that you don't need to instantia...

alrededor de 8 años hace | 5

Respondida
Generate pair of random numbers with respect to a sum constraint?
It isn't entirely clear what joint distribution you want for (x,y), but here is one possibility: x = rand; % uniform...

alrededor de 8 años hace | 0

Respondida
Run the same code with multiple variables.
It might be convenient to store each of the 10-20 matrices as one cell in a cell array, since that doesn't require that they hav...

alrededor de 8 años hace | 0

| aceptada

Respondida
Combine multiple if statements for something more compact
Maybe something like this: IGVals = [3.78 2.06 1.58 1.21 0.82]; CurrentIG = 1; i=1; while (VMPH<=60) ... ...

alrededor de 8 años hace | 0

| aceptada

Respondida
Optimization of function with constraints having products of variables
From your two constraints, it looks like p2 and p3 are completely determined by the other variables. If so, just optimize the s...

alrededor de 8 años hace | 3

Respondida
Extract data from a .txt file
This function loads all of the numbers into one big long list. You can then grab out the numbers you want if you know their seq...

alrededor de 8 años hace | 0

Respondida
I am getting conflicting results for probplot with weibull and censors. Is there some pre-processing going on in the back-ground that I am unaware of. This is when compared to Minitab.
I don't think probplot does any fitting. If not, your probplot command would just plot your data against a Weibull with the defa...

alrededor de 8 años hace | 0

Respondida
Plotting data in mat lab based on a certain criteria
If you convert your data into MATLAB's table format, <https://au.mathworks.com/matlabcentral/fileexchange/64581-milleratotago-pl...

alrededor de 8 años hace | 0

| aceptada

Respondida
Error when using fitrm - Fit Repeated Measures Model for RM ANOVA
This seems like a slightly nonstandard problem to me so I am not sure, but here is one way you might approach it. measureme...

alrededor de 8 años hace | 1

Respondida
How do I create a table from a for loop?
One possibility is to store the results in arrays as you go, then stuff them all into a table at the end. Something like this, ...

alrededor de 8 años hace | 0

| aceptada

Respondida
Why is cumsum producing CDF>1 values from a user defined distribution?
I think the problem is that the pdf is decreasing. Note that cumsum(paretoPDF).*dx approximates each segment of the PDF with th...

alrededor de 8 años hace | 0

Respondida
How can I display questions(one by one) on the screen from txt file ?(When using Psychtoolbox)
Unless you really have to collect these responses in PsychToolbox, you might be able to use http://www.mathworks.com/matlabcentr...

alrededor de 8 años hace | 0

Enviada


milleratotago/ExtractNameVal
Tools for passing optional parameters and name/value pairs in MATLAB.

alrededor de 8 años hace | 1 descarga |

0.0 / 5

Enviada


fminsearcharb
Function to minimize an error function with constrained and/or integer parameters

alrededor de 8 años hace | 1 descarga |

4.0 / 5

Respondida
How to acces multiple fields of a structure at the same time?
How about just this? result = [test.a test.c];

más de 8 años hace | 3

Respondida
One-tailed test using the ranksum function
Yes, there is an explanation. The flaw is in your intuition (which I admit is very compelling) that "the value of h should be e...

más de 8 años hace | 0

| aceptada

Respondida
Generate a vector "b" from an already defined vector "B" several times but taking different elements of "A" each time
idx=reshape(randperm(4425),15,295); b = reshape(B(idx(:)),15,295); The 15 rows of b are the 15 new vectors, and idx hold...

más de 8 años hace | 0

| aceptada

Respondida
fit a curve with smallest distance in y AND x direction to data points
It sounds like you want *"orthogonal linear regression"*. See <https://www.mathworks.com/matlabcentral/fileexchange/16800...

más de 8 años hace | 1

| aceptada

Respondida
How to fit data (x,y) with log-normal distrubition and not constant mu and sigma
I am still not sure that I understand the question, so let me summarize my interpretation: You have a set of (x_i,y_i). For ...

más de 8 años hace | 0

Respondida
How to fit data (x,y) with log-normal distrubition and not constant mu and sigma
I do not understand what you mean when you say, "I want to fit a data (x_i,y_i) using lognormal distrubition". To "fit" usual...

más de 8 años hace | 0

Respondida
Minimize error of linear regression by changing input x-vector
If you want to predict kWh from tc and ty, you might simply use the 2-predictor linear regression model kWh = a + b1*tc + b2*ty....

más de 8 años hace | 0

Respondida
How do I randomly generate multiple random shapes within a given area WITHOUT overlapping?
One very general way is to just keep generating shapes randomly but throw away any newly-generated random shapes that overlap wi...

más de 8 años hace | 0

| aceptada

Respondida
How to pseudo-randomize the ordering of a vector?
One approach is to think of your data, A, as being column one of a 2-column array (e.g., 10x2). Now generate pseudo-random numb...

más de 8 años hace | 1

| aceptada

Respondida
How to construct a Sliced Reduction Variable in MALTAB parallel for loop
Maybe something like this? k = cell(N,1); u = cell(N,1); parfor i = 1:N k{i} = ... % k is a matrix of dimen...

más de 8 años hace | 0

Pregunta


How can I control the format of the tick label numbers when using a log YScale with a large range?
I am trying to produce plots with a log Y-axis scale and with non-exponential format numbers (e.g., 1000, not 10^3) as labels fo...

más de 8 años hace | 1 respuesta | 1

1

respuesta

Cargar más