Question

Increase nonzero values without deleting zeros

I have a vector X. X=[0 0 0 0 1 1 1 1 0 0 0 0 0 0 2 2 2 2 2 2 0 0 0 3 3 3 3 0 0 0 0 0 4 4 4] I want to increase the valu...

4 years ago | 2 answers | 0

Question

How to delete previous points while plotting?

I am plotting live data, for the plotting, I am using the line function, which improved the plotting performance a lot compared ...

4 years ago | 0 answers | 0

Question

How to use a timer to increase the value of a variable?

I want to increase the value of handles.i by one after each iteration but this should happen after a certain amount of time. Usi...

4 years ago | 1 answer | 0

Answered

How to pause just one function, while others keep running?

I got around it using the timer function t = timer('TimerFcn',@(x,y)imshow('IMAGE'),'StartDelay',3); start(t...

How to pause just one function, while others keep running?

I got around it using the timer function t = timer('TimerFcn',@(x,y)imshow('IMAGE'),'StartDelay',3); start(t...

4 years ago | 1

| accepted

Question

How to pause just one function, while others keep running?

I have a GUI with two plots, one is controlled by a button, that when it is pressed it shows an image for a certain amount of ti...

4 years ago | 3 answers | 1

Question

Save each column of a matrix in a seperate .csv file

I was wondering how to write this code in a more elegant way. Basically, I want to save each column of the sample matrix in a se...

4 years ago | 1 answer | 0

Question

Matrix calculation, sum of two rows in each column

I have a matrix d and I want to calculate for every column the sum of each to numbers. The Result should be the result matrix ...

4 years ago | 1 answer | 0

Question

How to circumvent this error: Subscript indices must either be real positive integers or logicals.

Assume I have such a vector data=[2 4 5 6 8 3 5 6 7 8 9 …] I want to set this condition (in addition to other conditions com...

4 years ago | 1 answer | 0

Question

Change image automatically in a GUI after a certain time

I am working with GUIDE on MATLAB to create a GUI I have inserted an image in the GUI using an axes field and the imshow func...

4 years ago | 1 answer | 0

Question

Communication problems to an Arduino Board

I am working on MATLAB to communicate with an Arduino. The code is very simple. I am sending an A to the Board, and want to read...

4 years ago | 0 answers | 0

Question

Guide: How to save popup menu value in a text file

Hey, I have a popup menu with two options (m , f) Now I want to save the chosen option of the user in a text file when pressed ...

4 years ago | 1 answer | 0

Question

Compare all elements of a vector against each other

I have a vector that includes some values v=[2.4 3.5 7.4 3.6 4.5] each value is the mean value of a row in a matrix call...

4 years ago | 2 answers | 0

Question

Why does Simulink generate a sine wave as a triangle wave?

Hey community, i am new to Simulink. I wanted to generate a sine wave : sin(15*2*pi*t). But I always get a triangle wave even th...

5 years ago | 1 answer | 0