Community Profile

# the cyclist

### Alden Scientific

Last seen: Today Aktiv seit 2011

Head of Modeling and Statistics at Alden Scientific. Obsessive runner. Professional Interests: Predictive modeling, statistics. (I don't respond to email via author page, but will usually look at a question if you send me a link to it.)

Programming Languages:
Python, R, MATLAB, SQL
Spoken Languages:
English

#### Statistics

All

Abzeichen anzeigen

#### Content Feed

Anzeigen nach

Beantwortet
zeros of a matrix
The code you have posted here runs without error. M=rand(5); A=zeros(size(M,2)); My best guess here is that you have a variab...

22 Minuten vor | 0

Beantwortet
How to make certain indexes of a cell array empty?
Here are a couple ways: % Make up a cell array of pixelBlock pixelBlock = {'2','3','5',7; 11, 13, '17', '19'} % Replace a f...

ein Tag vor | 0

Beantwortet
i dont understand the error here, where do i put the parantheses??
It looks like on this line of your code: wn = pi/((S.PeakTime)(1-(zeta)^2)^ 0.5) you are assuming that MATLAB will understan...

ein Tag vor | 0

Beantwortet
Curve fitting tool fits a wrong equation
I can't figure out what is going wrong here, and I don't have the Curve Fitting Toolbox to play around. I get a sensible fit us...

3 Tage vor | 1

| akzeptiert

Beantwortet
Differences in power law fit vs. linear fit on log-log scale
Hm. I get much closer values when I use fitlm (0.498) and nlinfit (0.504), for the log-space and original space, respectively. (...

4 Tage vor | 0

| akzeptiert

Beantwortet
How to prevent the elongated plot when using tiled layout for image and plot
There are a few ways you can manipulate this. Here is one way, using the daspect command you used before: [X,Y,Z] = peaks(20); ...

5 Tage vor | 0

| akzeptiert

Beantwortet
I want to ask if it is possible to add these two horizontal matrices and if so, how?
As shown below, these two arrays have different sizes, and not even the same number of elements. Tt is very unclear, mathematica...

7 Tage vor | 0

Beantwortet
I used "autocorr"function and got this graph. How can I interpret this grpah meaning?
It's difficult to know how much needs to be explained here. I'll assume that you know what autocorrelation is. Unless you speci...

9 Tage vor | 0

| akzeptiert

Beantwortet
Constrained multiple linear regression with multiple dependent variables
I think mvregress does what you want. It has been ages since I've used it, but I wrote a pretty detailed answer that gave three ...

9 Tage vor | 0

Beantwortet
How to use unique() in a cell array
I'm not certain, but I believe what you want is unique(vertcat(b{:}))

9 Tage vor | 0

| akzeptiert

Beantwortet
Blockwise matrix addition without using more than 2 dimensions and cycles
This is awkward, but it does what you want. I think there is probably a better way. % Inputs A = [1,2,3,4,5,6,7,8; 9,10,11,12,...

10 Tage vor | 0

| akzeptiert

Beantwortet
Blockwise matrix addition without using more than 2 dimensions and cycles
A = [1,2,3,4,5,6,7,8; 9,10,11,12,13,14,15,16]; B = A(:,1:end/2) + A(:,(end/2)+1:end)

10 Tage vor | 0

Beantwortet
i want to multiply input * gex , where input is (60000 *784) and gex is (784 *1000), but when i multiply that i get this error message Error using input Not enough input a
The main problem here seems to be that input is a built-in MATLAB function, and your code is trying to call it (and doesn't have...

11 Tage vor | 0

Beantwortet
Mean data of each month (Data Matrix)
Here is one way: % Create a table of pretend data, in your format Var1 = [2000; 1; 1; 0.12]; Var2 = [2000; 1; 2; 0.13]; Var3...

11 Tage vor | 0

Beantwortet
Grouping data to reduce number of columns in a table
% Some pretend data TenSecResult = magic(3); % The output you want output = string(TenSecResult(:,1)) + "-" + string(TenSec...

11 Tage vor | 0

Beantwortet
How can I stop manually a true while loop?
When a file is executing, the Run button in the editor window becomes a Pause button. Pressing that will pause execution, with a...

12 Tage vor | 0

Beantwortet
Unable to perform assignment because the left and right sides have a different number of elements.
The assignment will only have the same number of elements if maskMax3D and maskMin3D have the same number of TRUE elements. For ...

12 Tage vor | 1

Beantwortet
How to plot the following figure in matlab?
I can't tell if you are asking for help in how to draw each individual plot, or just placing the individual plots. If you are j...

12 Tage vor | 0

| akzeptiert

Beantwortet
Write variable label on the Y-axis of graphs
plot(rand(3)) ylabel("$\tilde H_{H,2}^{H,1}$","Interpreter","latex")

16 Tage vor | 1

| akzeptiert

Beantwortet
Plotting Only 4 Time steps
I expect that this if statement is not doing what you expect ... if(mod(t,10)) The lines following that will be executed whene...

18 Tage vor | 1

Beantwortet
Changing Values in a while loop
I could not tell exactly what your code is supposed to do, but here I made a couple modifications: Bring the end statement that...

19 Tage vor | 0

Beantwortet
I want to repeat an array by another array
A = [1,2,3,4,5]; B = [2,3,1,7,2]; % You had a mismatch in the length of B compared to A C = repelem(A,B)

20 Tage vor | 0

| akzeptiert

Beantwortet
I need to get the r-square of the model
Instead of calling the fit function with one output sf = fit([xdata, ydata], zdata, 'poly11'); call it with two outputs [sf, ...

21 Tage vor | 0

Beantwortet
split mtatrix and name automatically
Anywhere that you could have used the variable name ur1, you can almost always just reference ur(:,1) directly instead, and not ...

26 Tage vor | 0

| akzeptiert

Beantwortet
Modify Tabs in Editor (Matlab 2022a)
The "Run and Time" and debugging features are now in a pull-down menu underneath the Run button in the Editor tab. I didn't fin...

27 Tage vor | 0

| akzeptiert

Beantwortet
Regression tree and prediction equation
This model is probably nonsense, because of the linear dependencies that @dpb points out. But perhaps your real data will yield ...

27 Tage vor | 0

| akzeptiert

Beantwortet
Is there a way to use a loop to generate outputs for a section of data (like rows 1 through 206) and then moving on to doing the same for subsequent rows within the same loop?
A somewhat more "advanced" way -- but perhaps more intuitive -- would be to convert Data into a 3-dimensional array first, where...

28 Tage vor | 0

Beantwortet
Is there a way to use a loop to generate outputs for a section of data (like rows 1 through 206) and then moving on to doing the same for subsequent rows within the same loop?
Here is one way: for ii = 1:100 indexToThisSection = (206*(ii-1)+1) : (206*ii); Stress=Data(indexToThisSection,...

28 Tage vor | 0

Beantwortet
making normally distributed over Specific Range
It is not possible to have a normal distribution in a finite range. So, we are all left guessing what the author of this docume...

30 Tage vor | 1

Beantwortet
How would I go about modifying a matrix of 1's and 0's, and converting that matrix to an image (or plot)
Here is another way, plotting circles. There are probably better ways to do this. It's a bit convoluted, because of the way matr...

etwa ein Monat vor | 1

| akzeptiert