Community Profile

# the cyclist

##### Last seen: 1일 전
4,582 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.)

#### the cyclist's 배지

모두 보기

참여 게시물
보기 기준

답변 있음
string for figure title ignores text after variable
Write it as one string, with the variable in the midst of it" t = 8.2; titlestr=sprintf('Time=%6.5f sec',t(1)); title(titles...

4일 전 | 0

| 수락됨

답변 있음
random selection of number among 2 numbers
Here are a couple ways: 2*randi([0 1]) 2*round(rand())

4일 전 | 1

답변 있음
How can I get un-descend index of latent in pca function
My answer to this question gives a detailed explanation of how to use MATLAB's pca function, including how to reduce the number ...

4일 전 | 1

| 수락됨

답변 있음
Feature vector dimension reduction (PCA)
I have written an answer to this question that explains in detail how to use MATLAB's pca function, including how to do dimensio...

4일 전 | 0

| 수락됨

답변 있음
Error using vertcat Dimensions of arrays being concatenated are not consistent.
data3 = [data1 data2] will concatenate them horizontally rather than vertically. You can do that, because they have the same nu...

8일 전 | 0

| 수락됨

답변 있음
build an array y depending on x
You have a few problems to fix: As you can see in its documentation, the input function requires you to include some prompting ...

9일 전 | 0

답변 있음
Unique numbers, not ordered
I believe this does what you want: X1 = [1 23 36 45 47 2]'; X2 = [1 36 47 2 6 ]'; X3 = [1 22 23 47 2 4]'; ...

9일 전 | 0

답변 있음
Input from PCA to train in SVM
I have written a "tutorial" on how to use and interpret MATLAB's pca function here. Lots of users have asked questions (some of ...

11일 전 | 0

| 수락됨

답변 있음
Assign a label to a point of a matrix in if statement
By default, Kappa_j is going to be a numeric array, and there cannot accept character input. Instead, you could define it as a c...

12일 전 | 1

| 수락됨

답변 있음
Subtraction of set value from specific elements in column once criteria met
threshold = 5000; % Set this to the limit value you want x(x>threshold) = x(x>threshold) - 65535;

14일 전 | 0

| 수락됨

답변 있음
calling script in another script

14일 전 | 0

답변 있음
Binary Logistic Regression - beginner
If you have the Statistics and Machine Learning Toolbox, you can use the fitglm function to fit a binomial logistic regression. ...

17일 전 | 0

| 수락됨

답변 있음
conversion double to array
If you want your 34x1 double to be in a single cell of a cell array, then ... inder = rand(34,1); inderCell1 = {inder} If you...

17일 전 | 0

| 수락됨

답변 있음
Reproduce a best-fit 4-parameter sigmoid
It is difficult when you say you have no idea. But, here are a few thoughts. If you have never used MATLAB at all, then you hav...

18일 전 | 0

답변 있음
the "taylor" function does not work for me (beginner)
In the assignment statement for T3, you capitalized "Taylor". MATLAB is case-sensitive, so you must use "taylor".

19일 전 | 2

답변 있음
Iterator goes infinite when changing step from 1 to 0.1
It's difficult to follow exactly what it going on in your code. I haven't traced the logic completely, but I figured out that wh...

19일 전 | 0

| 수락됨

답변 있음
Shorten the values from a column in another column.
The specific solution is potentially very dependent on ... the input format -- there are several way to read in Excel, leading ...

19일 전 | 0

| 수락됨

답변 있음
Operations with function handles / anonymous functions
Is this what you want? function1 = @(x) x(1)^2+5 function2 = @(x) 2*x(2) function12 = @(x) function1(x) + function2(x)

19일 전 | 1

| 수락됨

답변 있음
Shorten the values from a column in another column.
If these are numeric values, I think maybe you can do output_values = unique(floor(input_values)); But see my comment above, f...

19일 전 | 0

답변 있음
Covariance matrix as a diagonal matrix or not??????
I am definitely not an expert in this, but my guess is that these statements might only be strictly true for signals of infinite...

20일 전 | 0

답변 있음
summing columns based on certain interval
The best answer will depend on what specifically you want the output to be, and also how generalizable the solution needs to be....

20일 전 | 0

| 수락됨

답변 있음
How to delect the zero values in table
If all of the table entries are numeric, then this will work: % Create an example input table x = [0; 1; 0; 2]; y = [0; 1; 0;...

20일 전 | 0

| 수락됨

답변 있음
Exponent error calculating integral.
I expect you want phi.^3 instead of phi^3 inside your function fun

20일 전 | 0

답변 있음
How to generate a sparse matrix for a given array?
Here is one way: A = [1 3; 1 4; 2 3; 2 5; 3 5; 4 5]; d = max(A(:)); B = sparse(A(:,1),A(:,2...

21일 전 | 1

답변 있음
Assign rank to values in a matrix
Here is one way. (I did a smaller array, so the result is easier to verify.) % Set random seed for reproducibility rng default...

21일 전 | 1

| 수락됨

답변 있음
use mvnrnd with some conditions
Let's take this small example in which we generate just 3 pairs of correlated random numbers: n=3; % Generate 3 pairs, instead ...

24일 전 | 0

답변 있음
change variable in function_handle
I think this is what you mean? % Define f f=@(x) sin(x); % Derive g from f g = @(x) f(x+2); % Show that it gives expected r...

25일 전 | 0

| 수락됨

답변 있음
How to change legends' name
Here is a basic way you can do it: N = 3; figure hold on for ii = 1:N plot(rand(1,7),'DisplayName',sprintf('Theta %d'...

26일 전 | 0

| 수락됨

답변 있음
I want answer b for all value of N but it only read for latest value of N and value b become zero for 1st and 2nd of N. How i fix this problems?
I think you want b = (a*A*f)./(pi*Dm*N); I suggest you read Array vs. Matrix operations.

26일 전 | 0

| 수락됨

답변 있음
How do you load m-files that contain filenames with integers and strings?
Use the %d notation, and a cell array for storing: for ii = 1:50 B{ii} = load(sprintf('TTsim%dVariable.mat',ii)); end

26일 전 | 0