Community Profile

photo

the cyclist


Last seen: Today
4 506 total contributions since 2011

Data scientist at Cohen Veterans Bioscience; 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.)

Contact

the cyclist's Badges

  • Scavenger Finisher
  • Master
  • Thankful Level 4
  • 36 Month Streak
  • Likeable
  • Famous
  • Quiz Master
  • First Review
  • First Submission
  • Revival Level 3
  • Knowledgeable Level 4
  • First Answer
  • Puzzler
  • Speed Demon
  • Creator

View all

Contributions in
View by

Answered
Array indices must be positive integers or logical values.
Your variable A is the image data. Your variable t is the value of the image data at the (x,y) coordinate. That value of t coul...

ungefär 21 timmar ago | 0

| accepted

Answered
Inconsistency of angle function in finding angle of vectors
I would not characterize this as an inconsistency, so much as a convention to report the value in the range [-pi,pi], rather tha...

en dag ago | 0

Answered
How to Apply PCA Corrrect way
Your question, especially when you ask about the 88x88 matrix that is output from pca(), indicates that you don't really underst...

en dag ago | 0

| accepted

Answered
How can I fit Bessel function of 1st kind with the scatter plot?
I don't have the Curve Fitting Toolbox, so I cannot help with that. However, I used fitnlm, and I see a couple strange things a...

2 dagar ago | 0

| accepted

Answered
plot (t,y) ,dimension failure
The answer is right there in the error message. Use elementwise multiplication instead of matrix multiplication. clear all; clo...

2 dagar ago | 1

| accepted

Answered
Check true if value in a matrix is increasing,decreasing or staying same
Use the diff command, and check whether the result is greater than zero, etc.

4 dagar ago | 0

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
It looks like inside your function, in these lines dS = ((-beta*(B/(B+k))*S(tt) + ub*(S(tt)+I(tt)+R(tt)) - ud*S) * dt)'; dI = ...

5 dagar ago | 0

Answered
Invalid Expression with plotting t
Your code works after I fix two typos: dt=0.01; h=0.1; w=0.1; to=2.5; t=0:dt:10; r=h*exp(-((t-to).^2)/w^2); plot(t,r,'b',...

5 dagar ago | 0

| accepted

Answered
How to use REGRESSION & INTERPOLATION ?
I don't think you need interpolation for this task. Do you have the Statistics and Machine Learning Toolbox? You could fit a no...

5 dagar ago | 0

Answered
How to have a x-axis with repeating values (non-unique)
I have not seen a plot of this style. It's a bit confusing to me. I'm curious what the color background regimes are. Training, t...

7 dagar ago | 0

| accepted

Answered
errors using Numerical Integration
I see three errors: (1) You need elementwise division instead of matrix division: y = @(x) 1./(sqrt(1+x.^4)); % note the adde...

9 dagar ago | 1

| accepted

Answered
Uniformly distributed random variables
The main reason your output looks like this is that you are only generating ONE random value for each resistor -- and then recal...

9 dagar ago | 0

Answered
pseudo code for all n values
Assuming that what you wanted was alternating pattern of 1's and 0's, regardless of how large n is, then this should do what you...

10 dagar ago | 1

Answered
How to avoid "doubling up" in a RNG?
Here is one way to do what I think you mean: x = zeros(10,10); % For M and N, select 6 random integers from 1:10. M = randp...

11 dagar ago | 1

Answered
Call matlab from STATA
I haven't run MATLAB from the command line in probably 20 years, but I think I would try putting the whole try-catch structure i...

11 dagar ago | 0

| accepted

Answered
Save a double array to a text file
Regardless of what is displayed to the MATLAB command window (in your case, the default format, it seems), an array of type doub...

11 dagar ago | 0

Answered
Doubt in a product erro
The reason has to do with the accuracy of floating-point math on a binary computer. I suggest you read this question and answer,...

12 dagar ago | 1

Answered
How to only show part of a plot
You can set the axis limits of a plot using the xlim (and ylim and zlim) command. If that is not what you meant, I suggest you ...

13 dagar ago | 0

Answered
using logical functions to display arrays
When x is a vector, then if x < 10 is interpreted as "if all elements of x are less than 10". Your if statement is never enter...

13 dagar ago | 0

Answered
Cody Problem 14. Find the numeric mean of the prime numbers in a matrix.
After you correct the problem that @Geoff Hayes pointed out in his comment, you still have a mathematical one. out = sum/2 is ...

14 dagar ago | 0

Answered
Simpsons rule function error
In this line of code: x=x(1)+h*(2*k-1); you have set x to a scalar value, so when you try to access x(2) in this line of code:...

16 dagar ago | 1

| accepted

Answered
What Shall I need to add while calling file having numerical digits (e.g. -1,-2)?
You may want to try the functional form instead. load('Histories/IND.X0kY-1k.CXY.sema'); Also, what variables are in your work...

17 dagar ago | 0

Answered
clustering based on a custom function
I can't say that I have spent enough time with your code to fully understand it. But, I notice the following. Inside the loop o...

18 dagar ago | 0

| accepted

Answered
data from one array to another
I can't tell what you intend to get from this expression [x(j),:] which is not valid MATLAB syntax. x(j) is the j-th element o...

19 dagar ago | 0

Answered
How do i get three colums as output?
t = data(:,[93,92,91]); will be the the last three columns from data, in reverse order.

19 dagar ago | 1

| accepted

Answered
Placing none NaN values from a matrix to another
A = [NaN NaN NaN 3 0 NaN NaN 1; NaN 2 NaN 6 1 NaN NaN NaN; 5 NaN NaN 2 NaN NaN NaN 1]; B = [ 1 2 3 4 5 6 7 8; 8 7 6 5 4 3 2 1; ...

19 dagar ago | 0

| accepted

Answered
why i get Array indices must be positive integers or logical values.
In this line z(length(R),length(R)-1) = -R(length(R)-1) if the user enters a resistance vector that is length 1, then you try...

19 dagar ago | 0

| accepted

Answered
Error in code, "Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error. To construct matrices, use brackets instead of parentheses. "
You seem to have a rogue t at the end of your expression. If you get rid of that, then ... Td=1/55*(20*pi*sin(1/11*pi*t)+33*exp...

20 dagar ago | 0

Answered
Replacing single values in a matrix with 1x09 doubles
I think this does what you want, using a straightforward loop. You could loop this over values of N = 1:6, if what you want to ...

22 dagar ago | 1

| accepted

Answered
Unable to perform assignment because the left and right sides have a different number of element
You need to use K(n,:)=A; and L(n,:)=A; to assign the row vector A to a row of K or L. K(n) is a single element, using line...

23 dagar ago | 1

Load more