回答済み
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...

約8年 前 | 2

回答済み
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(:,...

約8年 前 | 2

| 採用済み

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

約8年 前 | 0

| 採用済み

回答済み
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...

約8年 前 | 0

回答済み
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> ...

約8年 前 | 0

| 採用済み

回答済み
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...

約8年 前 | 0

回答済み
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.

約8年 前 | 0

回答済み
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...

約8年 前 | 0

| 採用済み

回答済み
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...

約8年 前 | 1

回答済み
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...

約8年 前 | 0

| 採用済み

回答済み
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...

約8年 前 | 0

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

約8年 前 | 1

| 採用済み

回答済み
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 ...

約8年 前 | 0

回答済み
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...

約8年 前 | 0

回答済み
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...

約8年 前 | 0

| 採用済み

回答済み
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 ...

約8年 前 | 1

| 採用済み

回答済み
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...

約8年 前 | 0

回答済み
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...

約8年 前 | 0

回答済み
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...

約8年 前 | 0

回答済み
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...

8年以上 前 | 0

| 採用済み

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

8年以上 前 | 5

回答済み
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. ...

8年以上 前 | 0

| 採用済み

回答済み
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 ...

8年以上 前 | 1

| 採用済み

回答済み
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...

8年以上 前 | 0

| 採用済み

回答済み
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...

8年以上 前 | 5

| 採用済み

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

8年以上 前 | 1

| 採用済み

回答済み
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 ...

8年以上 前 | 0

回答済み
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...

8年以上 前 | 0

回答済み
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...

8年以上 前 | 0

回答済み
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...

8年以上 前 | 0

さらに読み込む