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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

Beantwortet
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)

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 5

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 3

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

Gesendet


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

mehr als 8 Jahre vor | 1 Download |

0.0 / 5

Gesendet


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

mehr als 8 Jahre vor | 2 Downloads |

4.0 / 5

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

mehr als 8 Jahre vor | 3

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

Frage


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

mehr als 8 Jahre vor | 1 Antwort | 1

1

Antwort

Mehr laden