Skip to main content

All Questions

Tagged with
0 votes
0 answers
27 views

Matrix dimensions must agree matlab warning in a for cycle

i'm trying to use the find function but i keep receiving an error. i have few variables lat_rho3; 181x1 matrix lon_rho2; 385x1 matrix Clat; 579x1 matrix Clon; 579x1 matrix the next for cycle is to ...
Juan Diego Lafont Pacheco's user avatar
0 votes
1 answer
148 views

MATLAB find on multiple columns to multiple column result

Setup I have an array of captured data. The data may be captured on just 1 device or up to a dozen devices, with each device being a column in the array. I have a prior statement which I execute on ...
Trashman's user avatar
  • 1,484
0 votes
1 answer
240 views

How can I find a row equal to a vector in a matrix in matlab ? In, particular I would like to have the indexes

I have a vector A=[1 2 3] and I have a matrix B=[5 6 8,1 2 3, 9 6 5]. How can I find the row indexes? I tried find but it didn't work
Pny's user avatar
  • 11
3 votes
1 answer
773 views

Matlab find() function in R

I am trying to convert some Matlab code into R. The code looks something like this: u= [.4 .5 .1; .2 .4 .4; .4 .1 .5] z= find(cumsum(u)>= rand,1) OUTPUT: e.g. z = 3 The mathematical ...
Steffen Schwerdtfeger's user avatar
0 votes
0 answers
37 views

How it work different matrix of find function

First, I declared two matrices. a = [1 2 3 4; 5 6 7 8]; b = [2 4 6 8]; then, i used to find function. find(a < b) ans = 1 3 5 7 My question is how it works? i tried ...
Jeonghyun Joo's user avatar
0 votes
1 answer
297 views

What does find(x==1) in MATLAB exactly return and what is equivalent to it in python?

I'm trying to do what the following MATLAB code does in python but I can't quite understand the output of it. This is the MATLAB code A = zeros((48,60)); A(3,5) = 1; A(3,6) = 1; A(48,60) = 1; A(47,60)...
color_blue's user avatar
1 vote
1 answer
91 views

Repmat in Matlab to replicate specific elements

I have the following lines of code where I find an event "41" in my cell array called Events (minimal example of this array included below) and the lines of code allow me to add 8 events ...
Maheen Siddiqui's user avatar
-1 votes
1 answer
231 views

How to find a brightest point an image and mark it in Matlab? [duplicate]

Dears, I would like to ask you for help with the code. My goal is to find the brightest point an image and mark it. I used the following code to get the Image in Grey Values -> How to find and ...
Tomáš's user avatar
  • 35
0 votes
1 answer
36 views

reach a specific index in a structered matrix with the function find matlab

I receive this error Attempt to reference field of non-structure array Error in perturb_method (line 136) [j,k]=find(pop(i).mat.p==x) pop is a population of structred matix (mat) i want to knew the ...
samia bouzid's user avatar
0 votes
1 answer
220 views

Given values and bin edges, find the bin of each value in MATLAB

I have a set of values and I want to find out to which bin each of them belong in more compact, likely vectorized and most importantly faster than the one below, values = rand(1,3)*50; bins = 0:10:50; ...
myradio's user avatar
  • 1,763
1 vote
2 answers
93 views

Matlab: Find string pattern with a list of words and replace in text with one word of the list

In Matlab, Consider the string: str = 'text text text [[word1,word2,word3]] text text' I want to isolate randomly one word of the list ('word1','word2','word3'), say 'word2', and then write, in a ...
pluton's user avatar
  • 242
0 votes
0 answers
301 views

how to find unique values with matlab in cell array

How do I find unique cells in excel using matlab? i was trying to get all unique strings in some excel field, so baisicly im trying to do somthing like this: [~,~,mainraw] = xlsread(mainfilename,1); ...
Ron Vaisman's user avatar
2 votes
1 answer
567 views

Efficiently implementing Matlab's "Find" function in Julia

I'm trying to implement Matlab's Find function in Julia. In Matlab, the code is find(A==0) where A is a very, very large n by m matrix, and where I iterate and update the above over a series of about ...
Joshuah Heath's user avatar
0 votes
1 answer
184 views

Find first non consecutive element in array in Matlab

I have a vector, "triggs" with the index number of my triggers. Each trigger lasts several milliseconds and I need to find where each trigger starts. Put otherwise, I need to find the first ...
Glu's user avatar
  • 327
0 votes
1 answer
63 views

What form does xarr and yarr have to be in in order to return all the co-ordinates that satisfy the equation

I'm currently looking to get this bit of code working in MatLab. I just wondering what form xarr and yarr have to be in for this to return values corresponding to coordinates of points within a circle....
John Whittock's user avatar

15 30 50 per page
1
2 3 4 5
18