Answered
Storing values in an array from a loop with multiple iterations and taking average
Is the best way to store them in an array after each iteration and then take an average? Yes. And if so how could i do...

9 years ago | 0

Answered
find the euclidean distance
The error message is clear: One or two of the arguments of the - operation is a cell, but you cannot perform arithmetic operatio...

9 years ago | 0

Answered
Improve the speed of a cell array that change size in a loop
Pre-allocation is never a drawback: for i=2:n pointCluster_temp = zeros(1, size(centroidPoints, 1)); dataSeti = data...

9 years ago | 0

| accepted

Answered
why isn't the importfile function not working?
The error message seems to be clear: The function |importfile| has not been created before, or it was saved to a folder which is...

9 years ago | 0

| accepted

Answered
how to remove comma from certain items only from cell array with several items
C = {['"98,786","103,630","95,758","99,871","106,916",494,361,"92,793",', ... "81,741","79,919","79,919",999,989,999'...

9 years ago | 1

Answered
Write a function called triangle_wave
Do you have any useful details about the "rejection of the grader"? Is this a Cody Coursework? I start to detest this, because m...

9 years ago | 0

| accepted

Answered
Subplotting programmatically for varying amounts of subplots
If your goal is to have up to 2x2 suplots on each figure: Folder = 'C:\Temp\'; FileList = dir(fullfile(Folder, '*.mat'...

9 years ago | 1

| accepted

Answered
MATLAB R2007a (32 bit, Win XP)
If you have a Matlab license of a newer version, you can download the old version also: <https://www.mathworks.com/downloads/web...

9 years ago | 0

Answered
How can I assign the colors to the pixles?
I do not understand the intention. As far as I understand, you do: RGB = rand(64, 44, 3); HSV = rgb2hsv(RGB); H = H...

9 years ago | 0

Answered
Daten zwischen zwei zwei Matlab instanzen hin und her schicken
See: <https://www.mathworks.com/matlabcentral/answers/283275-difference-between-tcpclient-and-tcpip>: Use <https://www.mathworks...

9 years ago | 0

Answered
How do I get the axis visible?
Set the 'Layer' property to 'top': axes('Layer', 'top') ... Draw the objects

9 years ago | 0

| accepted

Answered
About passing the parameter
You can store the value in the "handles" struct: function Main hFigure = figure; uicontrol(..., 'Callback', @Callback...

9 years ago | 0

Answered
How to set limit of cell?
If you want to create a loop over the existing elements of a cell, use the number of elements of this cell as upper limit: ...

9 years ago | 0

| accepted

Answered
is it im2double() have the same result with double()?
While |double()| converts the type of the data only, |im2double()| cares for the values also: img = uint8([255, 127]) do...

9 years ago | 1

Answered
Problem with sprintf and read DICOM images
There is no format specifier in the format string of |sprintf|: sprintf('C:/Users/ced0005/DP/DP_framework/DICOM/slicesCT/00...

9 years ago | 1

| accepted

Answered
The RGB vectors for white and red color are same for this image (Matlab)
[239, 227, 175] is the color of the background. I guess boldly that you have confused X and Y components of the coordinates. ...

9 years ago | 2

| accepted

Answered
What is generating "Subscript indices must either be real positive integers or logicals" in my code?
Please do not code as screenshot, but as text. Then the readers can use it by copy&paste. |matlabFunction| is a 79282x1 vecto...

9 years ago | 0

| accepted

Answered
Reading within parentheses in MATLAB
[EDITED] The former version replied both values, but the OP NP4432 asked for the value in parenthesis only. C = {'401 (106)...

9 years ago | 1

Answered
ODE45: Set of first order ode's: with one equation need backward running.
This is called a boundary value problem, see <https://www.mathworks.com/help/matlab/boundary-value-problems.html>. Either use |b...

9 years ago | 0

Answered
Speed up this fread loop
I simply added the bytes per block and divided the file size by this considering the "headerlength" and the "offset". This seems...

9 years ago | 0

Answered
Is there any function or method to convert negative decimal eg:(-2.3) to its binary equivalent in 2s complement form of specified no of bits?
See * <http://matlabgeeks.com/tips-tutorials/conversion-of-floating-point-numbers-in-matlab/> * <https://www.mathworks.com/...

9 years ago | 0

Answered
how to extract and save frames in a video ??
The shown code creates the file "1.jpg", "2.jpg" and so on. After getting the file names by |dir| they are ordered alphabeticall...

9 years ago | 11

| accepted

Answered
How to generate decimals in matlab
Did you read the documentation of <https://www.mathworks.com/help/matlab/ref/rand.html |rand|>? There you find a link to <https:...

9 years ago | 1

| accepted

Answered
how to create an game consisting 6 cards. 2 happy 2 sad 2angry. the game should prompt the user to choose 1 of 6 card and find the matching card, if wrong card is choosen, the wrong card closes back. can anyone help ?
Yes, anyone can help. Simply ask a question. Most likely posting some relevant code will be useful to get specific suggestion...

9 years ago | 0

Answered
Can I control the number of cores used by mldivide (\) during solution of set of linear equations?
We do not know the source code of Matlab's |mldivide| implementation. Please contact TMW directly.

9 years ago | 0

Answered
using a matrix as an index to another matrix
3 versions with a speed comparison: function speedtest x = rand(2000, 1000); tic; for k = 1:5 % Method 1:...

9 years ago | 1

| accepted

Answered
Unfiltered time history recovery from a low-pass filtered time history
Low-pass filtering means, that the high frequencies are removed. If they are removed from the signal, they vanish. You cannot re...

9 years ago | 0

Answered
Getting Rid of Nested For Loops
Replace for i = x_1:x_2-1 for j = y_1:y_2-1 mask(j, i) = new_image(j+1-y_1, i+1-x_1); ...

9 years ago | 0

| accepted

Answered
How can I delete a plotted line in an axes GUI?
Store the handle of the line and delete formerly existing lines: delete(handles.final); handles.final = plot([0 x_res],[...

9 years ago | 0

Load more