Beantwortet
a matlab code of getting a value uniformly at random from a the set {-1,1}
To generate values uniformly from the set {-1,1}, use: N = 100; x = 2*(rand(N,1)>0.5)-1; where N is the number of val...

mehr als 7 Jahre vor | 2

Beantwortet
separate the red part of imge
A naive approach would be to extract "red" colors from the image: I = imread('peppers.png'); R = I(:,:,1); G = I(:,...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
montage of 3 image
See <https://www.mathworks.com/help/images/ref/montage.html montage>. An example: I = imread('peppers.png'); R = I(:,...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Why does 'Position' property not change the width of uicontrol slider?
The width of the slider is the third element of the Position vector, not the fourth, which is height. Try something like: s...

mehr als 7 Jahre vor | 0

Beantwortet
How do i recognize the text is written in which language?
Read this: <http://www.mathworks.com/help/vision/ug/ocr-language-data-files-.html Install OCR Language Data Support Packages> ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
why this gives me "Index exceeds matrix dimensions?" can any one help me. Thanks in advance
Are you sure the image is RGB instead of grayscale? As the error suggests, the variable img must not have a 2 layer in the 3rd d...

mehr als 7 Jahre vor | 0

Beantwortet
How to paste matlab table into Excel with headers
Try using <https://www.mathworks.com/help/matlab/ref/writetable.html writetable> instead of copy-and-paste.

mehr als 7 Jahre vor | 0

Beantwortet
Using i as an index within a loop in Matlab 2016a
I don't know what you mean by "this code barfs". I ran a simple for-loop in MATLAB R2016a with i as the index variable and exper...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Why does input() display this string improperly?
I could not reproduce your error, but I am using R2016a, so maybe that is the reason. As an alternative, try: str = spri...

mehr als 7 Jahre vor | 1

Beantwortet
How to write a Matlab script that is able to output images of triangles based on the size input? The following shows the half of a triangle but i can't find a way to make an isolated triangle. (The size you can put at range 3 - 8 )
What types of triangles do you need? And what will they be used for? If you need very basic triangles, you could use the tria...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Im trying to print a randomized vector with 20 columns for each row. How do I get to stop after it reaches the final value of the vector?
If I understand your code correctly, it appears that you want to create a 65x65 matrix of random integers in the range [0 9] tha...

mehr als 7 Jahre vor | 0

Beantwortet
Clustering by kmean?
See the documentation on the <https://www.mathworks.com/help/stats/kmeans.html kmeans> function. IDX = kmeans(X,K) The f...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How to create a loop with the sum adding up to a given N?
This sounds like a homework problem. The answer is basically already in the question. N = 10; x = 0; for ii=1:N ...

mehr als 7 Jahre vor | 0

Beantwortet
Is it possible to execute 2 scripts in 2 different matlab sessions at the same time, both using parfor?
Can you provide more details about your code? How do you create the pool? How many workers are you using? I am having trouble...

mehr als 7 Jahre vor | 0

Beantwortet
How to find whether a ROI handle exist, if the ROI is not visible in the figure axes?
What do you mean by "display the updated image in GUI axes"? If you mean that you make a call to imshow or imagesc, then chances...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to change or modify variable that already exists netcdf ?
There should be no output arguments for ncwrite. Check the documentation <http://www.mathworks.com/help/matlab/ref/ncwrite.html ...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How can I use the imgaussfilt() function to process several images i have already saved into an array in the workspace?
It looks like you are sending a cell array to the imgaussfilt function instead of just a single image. Watch your indexing. Chan...

mehr als 7 Jahre vor | 0

Beantwortet
Plotting on axes in a GUI after running the GUI's callback from a different script
Why do you want to run the callback from a script instead of using the pushbutton? testGUI('plot_button_Callback',fig_handl...

mehr als 7 Jahre vor | 0

Beantwortet
How to return array of pixel values associated with image matrix (C)?
Try using <https://www.mathworks.com/help/images/ref/mat2gray.html mat2gray>. I = mat2gray(flipud(C),clim); EDIT: the co...

mehr als 7 Jahre vor | 0

Beantwortet
How to calculate the NN outputs manually?
If you use a squashing function on the output, then yes, it is impossible to get a result of 100 at an output. If you need to ha...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Make video from images
I usually use the <http://www.mathworks.com/help/matlab/ref/videowriter.html VideoWriter> class for making movies in MATLAB. ...

fast 8 Jahre vor | 5

Beantwortet
Removing all zeros in rows
It is not possible to have a (full) array with varying number of rows. MATLAB wants to store something in those empty spots. ...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
Possible bug in struct2table()
You may have already noticed this, but the error is due to having fields with an unequal number of rows. When you pass a scalar ...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
How to make annotation circle.? Current code appear in a box.
The function call is RGB = insertObjectAnnotation(I,shape,position,label). Change shape from 'rectangle' to 'circle', and cha...

etwa 8 Jahre vor | 0

| akzeptiert

Beantwortet
how would i track the speed of the centroid of the moving objects?
If it is acceptable to compute velocities post hoc, I suggest the following edits to this code: 1. Add tracks as an output so...

etwa 8 Jahre vor | 5

| akzeptiert

Beantwortet
manipulating face detection code?
Try this: cnt = 0; for ii=1:10 filename = sprintf('%d.jpg',ii); I = imread(filename); BB = step(EyeDetect...

etwa 8 Jahre vor | 1

| akzeptiert

Beantwortet
Write a script that will create a (random) vector of ages then make a graph in matlab
Instead of asking the community to write the full script for you, I suggest trying to write something yourself and then posting ...

etwa 8 Jahre vor | 0

Beantwortet
I am trying to obtain a series of vectors made of elements from a larger vector given they exceed a threshold
The reason your code does not currently work is because you are trying to assign a vector ( Z(Z>Z(i)) ) to a scalar element in a...

etwa 8 Jahre vor | 0

Beantwortet
Transform two vectors into a single one
Are all values of A and B integers? Do you know that all elements of A will be nonzero and that all elements of B will be less t...

etwa 8 Jahre vor | 0

Beantwortet
Mushroom detection in a photo
When you say you have tried Hough circles, do you mean <http://www.mathworks.com/help/images/ref/imfindcircles.html imfindcircle...

etwa 8 Jahre vor | 0

Mehr laden