Community Profile

# Bob Thompson

##### Last seen: 2 days ago
418 total contributions since 2016

View details...

Contributions in
View by

Find index where condition is true, or end of matrix
I appreciate the input, this is the best I was able to do: statestart = [find(Results.state==5,1) numel(Results.state)]; state...

3 days ago | 0

| accepted

Question

Find index where condition is true, or end of matrix
I have an array that represents the time based states of an analysis. I want to search the array for where a certain state start...

3 days ago | 2 answers | 0

### 2

Index in position 1 exceeds array bounds (must not exceed 1).
You're getting the error because your e input is size 1x8, but u = e(2,j) is trying to call the second row of e, which doesn't e...

11 days ago | 0

How do I use matlab to plot a graph where the x,y axes do not intersect?
Create your figure first, then create the axes. This will allow you to specify what they are before the data gets populated, and...

11 days ago | 0

modifying variable names to enable indexing in a loop
Adjust your variable to index into a multi-dimensional array. I recommend using the first dimension, rows, for the final number ...

11 days ago | 1

| accepted

Question

Difference between switch and if
I just ran across switch being used in a code and am wonder how it differs from if. The use of switch may not have been well set...

17 days ago | 2 answers | 0

### 2

Remove corresponding values in two arrays
How can I do this easily? Please feel free to elaborate what 'easily' means to you. Your logic for A seems pretty well set up t...

24 days ago | 0

Question

Shift sheets of matrix individually without loop
I've seen this question a couple of times, but the questions seemed to be old, and used arrayfun which seems like just another l...

25 days ago | 0 answers | 0

### 0

Combine rows and average contents in table
I'm not sure how you're defining the time time ranges but here's some psuedo code that I thought about for the rest of the proce...

1 month ago | 0

Question

Why does dir command find files not following pattern in Windows?
I have series of files that I am trying to pick up with a dir command. I'm able to get the files, but I'm also picking up one ex...

1 month ago | 1 answer | 0

### 1

For loop indexing problem
Part of the problem is that you're trying to push a 749x2 matrix into an array of 749x1 size (BMactive(:,jj) only calls one colu...

1 month ago | 1

| accepted

easy indexing lon-loop versus loop
I think the issue is with your loop definition. You define y1 to be length(x)+M1 long, but n is defined from M1+1 to length(x). ...

1 month ago | 0

Question

Interpolating non-independent values
I'm not really sure how to ask this in a concise enough way to find it elsewhere, so I'm just going to ask a new question. I ha...

1 month ago | 2 answers | 1

### 2

Creating Several Data Sheets
If you want to performa the reorganization with MATLAB here is an outline of one possible process to do so. 1) Read that three ...

1 month ago | 0

Counting variables, and getting last column of matrix within specific criteria
I'm not sure I entirely understand the issue with 6.9418. Are you saying you only want 6.9418 as the magnitude, even though you ...

1 month ago | 1

| accepted

Question

Linux vs Windows system commands
This may not be the forum for this, I can remove the question if it's not, but I have a script that runs a series of system comm...

2 months ago | 1 answer | 0

### 1

Question

array2table won't accept variable name input
I am attempting to turn an array into a table before I output it into a file, and I am running into an error when I attempt to t...

2 months ago | 2 answers | 0

### 2

Question

Looking for an alternative to regexp.
I'm looking for an alternative way to parse through strings to find bits of information, or for a way to use regexp that doesn't...

2 months ago | 2 answers | 0

### 2

Question

Debugger not stopping on marker
I have a short code that I have put a debug marker in, before running it, but when it gets run the code moves past the marker an...

2 months ago | 1 answer | 0

### 1

Terminating a game of tic tac toe if two entries are entered in the same cell
John has a pretty good idea with that. If you put in a logic check and a loop, you don't even need to actually quit the game, j...

2 months ago | 0

| accepted

save matrices from loop
I could be wrong, but it seems like you just need to index flow. vidReader = VideoReader('Tennis Ball.avi'); % Read the Video ...

2 months ago | 0

| accepted

help with Tic Tac toe
Hmm, maybe I spoke too soon on the centering. Size can be set by adding a 'name,value' pair to the text command. text(x,y,play...

2 months ago | 0

| accepted

Question

dlmwrite does not append to file
I am writing headers and data to a text file, and I am able to write the headers using fprintf, so I know my filepath is correct...

2 months ago | 1 answer | 0

### 1

Access matrix values inside of a function
I believe this is the purpose of global variables, but I could be wrong. I don't really use them much.

2 months ago | 0

| accepted

How to average each row from two indivisual comlum vectors?
The mean command has an option to average in a specific dimension. A = [1 4; 2 3; 3 2; 4 1]; B = mean(A,2);

2 months ago | 0

Changing work space values
To change values for existing variables, you can define the new values for the variable in the command line, write/edit a script...

2 months ago | 0

How to pick files from sub-folder
I recommend using dir to capture all the contents of your parent folder within a variable. Then you can use the contents of that...

2 months ago | 0

| accepted

How can I allow the user to choose what to do?
Some basic ways to get input from the user include commands such as uigetfile, uigetdir, and input. I recommend the last, couple...

2 months ago | 0

| accepted

How can I use loop to produce multiple graphs?
If you want individual graphs, add the following inside the loop, before the yyaxis command: ... figure(i) yyaxis left ... ...

2 months ago | 0