Community Profile

# the cyclist

##### Last seen: Today
4.370 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.)

View all

Contributions in
View by

How to change my x axis value
It would be helpful if you posted your data, so we know exactly how it is stored (e.g. do you just have the years stored as nume...

8 Tage ago | 2

| accepted

Why variables are different tha command window values?
In the command window, you seem to be highlighting elements 1323:1325. In the variable window, you seem to be highlighting eleme...

10 Tage ago | 0

| accepted

How can I combine these two MATLAB codes? (MATLAB)
Use the hold command figure hold on plot(t, y2, 'linewidth', 2); plot(t,y,'linewidth',2); and then your other commands for ...

14 Tage ago | 0

[SOLVED]: I'm getting the error "Array dimensions must match"
I recommend that you use the debugger to investigate. Specifically, set a breakpoint at the line U = F.*(ones(sz) + Beta.* L); ...

15 Tage ago | 1

| accepted

Why do I get non-zero standard deviation in data with no variability?
Your standard deviaions are zero -- to within the accuracy possible by calculation in floating point numbers. The first referen...

16 Tage ago | 1

How can I fit data to a system of implicit equations?
I'm pretty sure that this is a really tricky problem to solve, and I am not certain it can be done in MATLAB. (When I say this, ...

16 Tage ago | 0

how can i determine angle between 2 variables
You got the order of the inputs incorrect. It should be atan2(rAy,rAx)*g This will give a negative answer, measuring the angle...

16 Tage ago | 0

Not enough input arguments.
How are you calling the function? If you call it like this ... Fillter() then you will get that error because Fillter is expec...

16 Tage ago | 0

| accepted

The logical indices in position 1 contain a true value outside of the array bounds.
You don't give enough information to diagnose why this is happening in your code, but here is an example of that error and how i...

20 Tage ago | 0

Illegal use of reserved keyword "end"
In the statement s2=[a2(length(a2)) max([a2,a3,a4,a5,a6,a7,a11,a13,a17,a19,a23,a25,a29,a31,a35,a37]); you seem to have missed ...

25 Tage ago | 0

| accepted

i am a beginner matlab user , and i have problem with the number of decimal places , i need to increase them , what should i do ? here is the code , can anyone just edit it to increase the number of decimal places
You can use the format command, e.g. format long Note that MATLAB always stores the result as double precision by default -- y...

27 Tage ago | 0

| accepted

Using chaotic sequence to generate random numbers
This GitHub repo has a MATLAB implementation. I cannot attest to its quality.

28 Tage ago | 0

| accepted

How can I change this 3-D array(2000,21,80) to 4-D array(1000,20,21,80)?
Did you mean (1000,2,21,80)? If so, then you can use the reshape command: output = reshape(x,[1000,2,21,80]); where x is your ...

28 Tage ago | 0

finding a value of x for a given y
interp1(y,x,80)

30 Tage ago | 0

| accepted

Resample from a nonuniform time history while keeping the peak and valley values
There is almost certainly not a built-in function that does this resampling in the exact way you want. Instead, you need to thin...

etwa ein Monat ago | 0

"Error using plot, Value not a numeric scalar"
The LineWidth parameter should just be the number 2 (without quotes), not the character '2'. After that, you are going to run...

etwa ein Monat ago | 0

Convert each cell to 4D
The best method to do this might depend on how generalizable you need this to be to other cell arrays (with different internal a...

etwa ein Monat ago | 0

Fourier transform for a sequence of values
fft(x)

etwa ein Monat ago | 0

Why can't I use fplot command ?
fplot expects a function as input. I think you want the plot command instead, which expects numerical vector input ... plot(x_t...

etwa ein Monat ago | 1

Correlation of two variables over time: can this happen?
Yes. This is known as Simpson's Paradox. Here is an example: rng default x1 = [1 2 3 4 6 7 8 9]'; x2 = [1 2 3 4 -6 -5 -...

etwa ein Monat ago | 1

| accepted

errorbar for x and y
This code works for me. What version of MATLAB are you running? If you have an older version, and cannot update, then you could...

etwa ein Monat ago | 0

| accepted

matrix variable problem in matlab

etwa ein Monat ago | 0

I want to solve a problem with just numbers from 0 to 2, how do I do that?
Are you sure you copied everything from the assignment correctly? Can you post the text of the assignment here? I did the Gauss...

etwa 2 Monate ago | 0

how to find index of matrix
It looks like you were checking the wrong columns. row = find (A(:,2)==9 & A(:,3)==5.125) Also, you need to use & rather than ...

etwa 2 Monate ago | 1

Index exceeds the number of array elements
This is not strictly an answer to your question, but I recommend learning how to use the debugger. Then you will be able to pinp...

etwa 2 Monate ago | 0

I suggest you look for code for a similar figure in the MATLAB Plot Gallery.

etwa 2 Monate ago | 0

| accepted

How to reorganize an array given an index
Here is one way: % Inputs array = [1,2,3,4,5,NaN,NaN,NaN]; idx_flag = [1,4,8]; % Get length of array for convenience L = ...

etwa 2 Monate ago | 1

| accepted

How can I plot a histogram out of a vector of percentages
I don't think you want a histogram (which would create the percentages from the raw data). I think you just need a bar graph.

etwa 2 Monate ago | 0

| accepted

how to calculate distance euclidean
c(m,n) is the absolute value of the difference between the m-th element of the vector stored in a and the n-th element of the ve...

etwa 2 Monate ago | 0