How to crop a region in LIDAR point cloud [closed] - matlab

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have 2 data set point cloud and I want to crop a part of them together.
Because of volume of them is too too large I couldn't crop them with below codes.
Can you help me to how can I crop them?
Used codes are:
selectedl=[];%% last pulse
for i=1:size(indexl)
selectl=lr(indexl(i),:);
selectedl=[selectedl;selectl];
end
selectedf=[];%% first pulse
for i=1:size(indexf)
selectf=fr(indexf(i),:);
selectedf=[selectedf;selectf];
end
Thank U all.

It is a bit difficult to understand what you want to do, as lr, fr, indexl and indexf are missing.
But assuming something like
lr = rand(5,3) ;
indexl = [2 5] ;
I would advise to allocate selectedl above the loop
selectedl = NaN(length(indexl),size(lr,2)) ;
for i = 1:length(indexl)
selectedl(i,:) = lr(indexl(i),:) ;
end
This might not be needed for this example, but if the data size becomes larger this will speed up the loop.

Related

How to create a a:d:b vector to create and display "sin(0), sin(pi/n), sin((2*pi)/n), . . . , sin(2*pi)]" [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been trying for a while to get this to work but I don't seem to be getting any closer to a solution.
I'm not sure of what the pattern is and what to write for the "d" value in a:d:b
Clearly you want to start from 0 (a) and go to 2*pi (b).
Now the question comes what is your step size (d)?
From your example you can see that you are changing from 0 to pi/n.
And from pi/n to 2*pi/n.
This means your step size is d=pi/n
Once you defined your n, e.g:
n=10;
you can do the rest like this:
x=0:(pi/n):(2*pi)
y=sin(x);

How can I use Non-linear Fitting function on Matlab [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have Non-linear Fitting function like:
prate ~ (m1-((m1-m2)/(1+(IC50/(conc)))))
And a table:
[I] (µM) Max polymerization rate
25.00 3.08
12.50 3.30
6.13 4.44
and IC50 = 1.87
I want to create a function like the one above and use this data to make a plot. Is that possible?
This might help you get started.
You need to define your function using handles.
Say you have a variable PolymerRate you want to estimate and conc as input variable, I think in your case would be something like:
IC50 = 1.87;
prate = #(m,conc) (m(1)-((m(1)-m(2))/(1+(IC50/(conc)))));
m0 = [1 1];
[m,resnorm,~,exitflag,output] = lsqcurvefit(F,m0,conc,PolymerRate);
plot(conc,PolymerRate,'ro')
hold on
plot(conc,prate(m,conc))

Why I get this Error? (State Space) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Could someone explain me what I must change in my model?
Model
The error messages are pretty clear and self-explanatory. The reason you get the error is because B is of dimension 4x2 and you are trying to do B * Xr where Xr is of dimension 1. According to your equation, you need to do B*U where U = [dXr/dt; Xr];. However, using the derivative block is never a good idea in Simulink if you can avoid it, especially with a step input. Think about how you want to formulate the inputs to your state-space.

how to extract data from image by user [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to my program give a image to user and user by mouse choose a pixel,then spatial information of pixel return to program for another process.
how write code for it in matlab ?
Try this:
A=imread('your image');
imshow(A);
impixelinfo;
[c, r, vals] = impixel;
c and r are arrays of all the columns and rows of the part of the image that user clicked on and vals are the RGB values of each point.

need help for matlab [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
This figure illustrates my problem:
t (in the X1 calculation) value changes from 0 to etz. If its value reaches etz it has to start from 0 again and again.
This situation has to continue during simulation (I need a loop!). However, t is simulation time and I cannot force it to be zero. So maybe I need a parallel time to the simulation time but I don't how to create it.
Use modulo operator.
http://www.mathworks.com/help/matlab/ref/mod.html
For example:
X1 = abs((mod(t,e*tz)-e*tz/2)/(1.125*c*tz))
This part:
mod(t,e*tz)
Will be >= 0 and < e*tz and will repeat the way you want.
In the future, please provide a better title for your question. Also, providing a screen shot of your code is not the preferred way to include code.