University of Rochester, NY

New Bulgarian University, Sofia Bulgaria

Answered

Rolling window column selection

Here's one solution that creates 14 column vectors in a manner your described. I stored fake data in column |v|, identified the...

Rolling window column selection

Here's one solution that creates 14 column vectors in a manner your described. I stored fake data in column |v|, identified the...

4 hours ago | 0

Answered

Sliding window to calculate intra-window difference

The formula in the attachment is written below. I don't know what your value |W| is and I don't now how your variable |N| comes ...

Sliding window to calculate intra-window difference

The formula in the attachment is written below. I don't know what your value |W| is and I don't now how your variable |N| comes ...

4 hours ago | 1

Answered

upload txt file for a matrix

check out |dlmread()| <https://www.mathworks.com/help/matlab/ref/dlmread.html> or |textscan()| <https://www.mathworks.c...

upload txt file for a matrix

check out |dlmread()| <https://www.mathworks.com/help/matlab/ref/dlmread.html> or |textscan()| <https://www.mathworks.c...

5 hours ago | 0

Answered

Finding the first element of a matrix that satisfy a condition in a frequently manner

_... I want to extract just the first element whenever the condition is true..._ This line below will return the index valu...

Finding the first element of a matrix that satisfy a condition in a frequently manner

_... I want to extract just the first element whenever the condition is true..._ This line below will return the index valu...

7 hours ago | 0

Answered

How to make a button works depending on which button a selected before?

This sounds like a potential mess but I'll give it the benefit of doubt and suggest a solution. But please make sure your idea ...

How to make a button works depending on which button a selected before?

This sounds like a potential mess but I'll give it the benefit of doubt and suggest a solution. But please make sure your idea ...

2 days ago | 0

Answered

How to get a program to display something from a function?

Remove the semicolon at the end of counter = counter + 1 The value of 'counter' will then display every time it's upd...

How to get a program to display something from a function?

Remove the semicolon at the end of counter = counter + 1 The value of 'counter' will then display every time it's upd...

2 days ago | 0

| accepted

Answered

Plotting individual cases on separate graphs

Some reverse engineering is needed to guess at what's being plotted but here's my guess at the problem. Your |ff|-loop is th...

Plotting individual cases on separate graphs

Some reverse engineering is needed to guess at what's being plotted but here's my guess at the problem. Your |ff|-loop is th...

2 days ago | 0

Answered

speed regulation loop; how to start from non zero value?

The question is vague but I _think_ this is what you're looking for. values = [-10 : 10]; %Here ar...

speed regulation loop; how to start from non zero value?

The question is vague but I _think_ this is what you're looking for. values = [-10 : 10]; %Here ar...

3 days ago | 0

Answered

I can not figure out how to output an Ohms to the command window.

If Ohms is a variable in a function called from the command line, add Ohms to the outputs. function Ohms = myfunc(a) ...

I can not figure out how to output an Ohms to the command window.

If Ohms is a variable in a function called from the command line, add Ohms to the outputs. function Ohms = myfunc(a) ...

3 days ago | 0

Answered

How to compare a number with all the values of a vector?

if ismember(alpha, A) or if any(A == alpha)

How to compare a number with all the values of a vector?

if ismember(alpha, A) or if any(A == alpha)

3 days ago | 0

| accepted

Answered

how to do density plot?

You can read the data back in with |dmlread()| data = dlmread('data.txt', '%f'); ' |data|' will be the [10000 x 3] matr...

how to do density plot?

You can read the data back in with |dmlread()| data = dlmread('data.txt', '%f'); ' |data|' will be the [10000 x 3] matr...

5 days ago | 0

| accepted

Answered

Is there a way to calculate the incremental slope of a graph for each point and then plot (x, slope)?

The equation for slope is change in y divided by change in x. slope = (y2 - y1) / (x2 - x1); Assuming X and Y are vec...

Is there a way to calculate the incremental slope of a graph for each point and then plot (x, slope)?

The equation for slope is change in y divided by change in x. slope = (y2 - y1) / (x2 - x1); Assuming X and Y are vec...

5 days ago | 0

Answered

How to put loop for multiple folders in matlab?

allFolders = {'C:\Users\Anu\folder1', 'C:\Users\Anu\folder2', 'C:\Users\Anu\folder3'}; for i = 1:length(allFolders) ...

How to put loop for multiple folders in matlab?

allFolders = {'C:\Users\Anu\folder1', 'C:\Users\Anu\folder2', 'C:\Users\Anu\folder3'}; for i = 1:length(allFolders) ...

6 days ago | 0

| accepted

Answered

Add multiple y axes to a plot

|plotyy()| creates a plot using the left and right axes. To have more than 2 axes, start by reading this blog by Loren. In add...

Add multiple y axes to a plot

|plotyy()| creates a plot using the left and right axes. To have more than 2 axes, start by reading this blog by Loren. In add...

6 days ago | 0

Answered

How to organize large column in to small Commons.

This requires dynamic variable naming and it's not a good practice. To understand why read this: <https://www.mathworks.c...

How to organize large column in to small Commons.

This requires dynamic variable naming and it's not a good practice. To understand why read this: <https://www.mathworks.c...

6 days ago | 1

Answered

Guys, how to simulate or code "warning messages in I2V communication?

Read about Matlab's <https://www.mathworks.com/help/matlab/ref/warning.html warning> function and warning <https://www.mathworks...

Guys, how to simulate or code "warning messages in I2V communication?

Read about Matlab's <https://www.mathworks.com/help/matlab/ref/warning.html warning> function and warning <https://www.mathworks...

6 days ago | 0

| accepted

Answered

How would I do this with a while loop script?

Use |isinteger()| which returns 0/1 for each element of the vector. <https://www.mathworks.com/help/matlab/ref/isinteger.ht...

How would I do this with a while loop script?

Use |isinteger()| which returns 0/1 for each element of the vector. <https://www.mathworks.com/help/matlab/ref/isinteger.ht...

7 days ago | 0

| accepted

Question

Setting matlab 2018b as default program

I've recently installed matlab 2018b on my Windows 7 computer and it installed successfully in the default directory |C:\Program...

9 days ago | 0 answers | 0

Answered

Check if sub-block in matrix meets a condition?

Here's *a* solution that involves a loop but it's very fast. This searches for a submatrix |key| within a larger matrix |main|....

Check if sub-block in matrix meets a condition?

Here's *a* solution that involves a loop but it's very fast. This searches for a submatrix |key| within a larger matrix |main|....

9 days ago | 0

| accepted

Answered

Error, Index in position 2 exceeds array bounds!!

My bet is that |dm| is empty which would imply either that your |Sp.txt| document is empty or it's not loading correctly. d...

Error, Index in position 2 exceeds array bounds!!

My bet is that |dm| is empty which would imply either that your |Sp.txt| document is empty or it's not loading correctly. d...

10 days ago | 0

| accepted

Answered

MATLAB GUI clear plot1 but not plot2 and vice-versa

_my question is: how do I clear the most recently plotted item while using one axes handle?_ *Option 1* This option may or ma...

MATLAB GUI clear plot1 but not plot2 and vice-versa

_my question is: how do I clear the most recently plotted item while using one axes handle?_ *Option 1* This option may or ma...

10 days ago | 0

Submitted

legendUnq

Create a legend without duplicate entries or create 1 legend for multiple subplots.

10 days ago | 5 downloads |

Answered

How to add variables to the Plot Fcn?

One solution is to write an anonymous function and define the extra values prior to creating the anonymous function. Those extr...

How to add variables to the Plot Fcn?

One solution is to write an anonymous function and define the extra values prior to creating the anonymous function. Those extr...

11 days ago | 0

| accepted

Answered

When i open Matlab i get this error massage: MATLAB:hg:InvalidProperty

In your |startup.m| file, remove the 's' in window*s*. INCORRECT: set(0,'DefaultFigureWindowsStyle','docked') CORRECT...

When i open Matlab i get this error massage: MATLAB:hg:InvalidProperty

In your |startup.m| file, remove the 's' in window*s*. INCORRECT: set(0,'DefaultFigureWindowsStyle','docked') CORRECT...

13 days ago | 1

Answered

hi,I have a 5-dimensional matrix and I want to pull out 3 dimensions. How do I do that?

help squeeze Example: d = rand(3,4,5,6,7); s = squeeze(d(:,:,:,1,1)); >> ndims(s) ans = 3 >> ...

hi,I have a 5-dimensional matrix and I want to pull out 3 dimensions. How do I do that?

help squeeze Example: d = rand(3,4,5,6,7); s = squeeze(d(:,:,:,1,1)); >> ndims(s) ans = 3 >> ...

14 days ago | 0

Answered

How to show values on heatmap belonging to a different dataset.

_Can this be done in matlab??_ Short answer: no. The text in each cell of the heatmap is stored in |h.ColorDisplayData| (ass...

How to show values on heatmap belonging to a different dataset.

_Can this be done in matlab??_ Short answer: no. The text in each cell of the heatmap is stored in |h.ColorDisplayData| (ass...

14 days ago | 0

Answered

Smoothing discrete data with hanning window

Here's a full description and examples. <https://www.mathworks.com/help/signal/ref/hann.html>

Smoothing discrete data with hanning window

Here's a full description and examples. <https://www.mathworks.com/help/signal/ref/hann.html>

26 days ago | 0

Answered

How can I create a specific stopwatch

I coded up a demo for you. The m file is attached but I've also included the code below so I can walk you through it. I suggest...

How can I create a specific stopwatch

I coded up a demo for you. The m file is attached but I've also included the code below so I can walk you through it. I suggest...

28 days ago | 0

Answered

At every second step fmincon stays on the same point but should continue.

It looks like the algorithm settled quickly at a local minima. This isn't necessarily a bad thing - you just want to make sure ...

At every second step fmincon stays on the same point but should continue.

It looks like the algorithm settled quickly at a local minima. This isn't necessarily a bad thing - you just want to make sure ...

1 month ago | 0

Answered

Transposing a 1x100 double to be a 100x1 double inside a Structure

By hand? At the very least do it in a loop! :) Here's a simple method that you could do in 1 line of code. I wrote it in 2...

Transposing a 1x100 double to be a 100x1 double inside a Structure

By hand? At the very least do it in a loop! :) Here's a simple method that you could do in 1 line of code. I wrote it in 2...

1 month ago | 1

| accepted