Image processing in Matlab [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 5 years ago.
Improve this question
I took this from the Matlab help section:
text(size(I,2),size(I,1)+15, ...
'Image courtesy of Massachusetts Institute of Technology', ...
'FontSize',7,'HorizontalAlignment','right');
I don't understand how it works, could anyone explain it to me?

https://www.mathworks.com/help/matlab/ref/text.html
In summary:
x = size(I,2)
y = size(I,1)+15
"..." is just the statmentment line continuation character in matlab (it is basically saying, do not end this statement here, but rather continue reading next line)
actual text = 'Image courtesy of Massachusetts Institute of Technology'
The next 4 arguments are name-value pairs (as described in the link above). Basically, it allows you to grab a particular setting and apply it a value based on its name.
font size is set to 7 and horizontal alignment is set to right.

Related

how to substitute one funtion into integration with infinity as upper limit in maple? [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 3 days ago.
This post was edited and submitted for review 3 days ago.
Improve this question
When I substitue the function in to the integration with infinity as upper limit, maple fails.
https://i.stack.imgur.com/VAkeO.jpg
https://i.stack.imgur.com/ujfGS.jpg
I can substitue successfully the function in to the integration with another variable as upper limit as shown in the figure. I hope to keep the infinity symbol in the substituted result.
The following is the plain text code:
f := u -> theta*exp(-theta*u);
subs(f(u__b) = f(u), int(h(Q, u__b)*f(u__b), u__b = q__a .. infinity));
subs(f(u__b) = f(u), int(h(Q, u__b)*f(u__b), u__b = q__a .. IN));

Is it possible to plot bars with filled pattern in 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 2 years ago.
Improve this question
Is it possible to plot bars with filled pattern in Matlab, like this figure?
I attempted to use applyhatch_pluscolor link however, I couldn't make it work (attempt below). Is there an easy / feasible alternative?
Test code:
bar(rand(3,4));
[im_hatch,colorlist] = applyhatch_pluscolor(gcf,'\-x.',1,[],[],150);
Then I changed the source code, from bits = hardcopy(h,'-dzbuffer',['-r' num2str(dpi)]); to bits = print(h,'-RGBImage',['-r' num2str(dpi)]);.
I got the figure below. However, this is still far away form the desired result.

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);

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 crop a region in LIDAR point cloud [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 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.