1.796 total contributions since 2014

Professional Interests: Signal Processing, OOP, Matlab GUI programming, Machine Learning

Answered

How to set the x-aixs when plotting with certain row and column of matrix

I'm surprised you can see anything useful on that using plot rather than an image, but the plot function takes multiple argument...

How to set the x-aixs when plotting with certain row and column of matrix

I'm surprised you can see anything useful on that using plot rather than an image, but the plot function takes multiple argument...

ein Tag ago | 0

Answered

Undefined variable or class error

The variable in your mat file is called NEWSST, not NEWSST_2015. It is usually better though to load a mat file into a struct a...

Undefined variable or class error

The variable in your mat file is called NEWSST, not NEWSST_2015. It is usually better though to load a mat file into a struct a...

ein Tag ago | 0

| accepted

Answered

How to hide a figure instead of deleting it?

If you over-ride the CloseRequestFcn you can have it do whatever you tell it. In general you should always have this function c...

How to hide a figure instead of deleting it?

If you over-ride the CloseRequestFcn you can have it do whatever you tell it. In general you should always have this function c...

2 Tage ago | 1

| accepted

Answered

Given an instance of a class (without knowing class name), how to call the constructor?

Since your class doesn't inherit from handle the assignment operator will give you a copy of the correct class. However, this w...

Given an instance of a class (without knowing class name), how to call the constructor?

Since your class doesn't inherit from handle the assignment operator will give you a copy of the correct class. However, this w...

3 Tage ago | 0

Answered

Create a specular colormap

figure; imagesc( rand(100) - 0.5 ); % Random data centred on 0 baseCmap = hot( 256 ); cmap = [ flip( baseCmap(2:end,:) ); base...

Create a specular colormap

figure; imagesc( rand(100) - 0.5 ); % Random data centred on 0 baseCmap = hot( 256 ); cmap = [ flip( baseCmap(2:end,:) ); base...

5 Tage ago | 1

| accepted

Answered

calculate the mean square error

Calculate the error, square it and calculate the mean! mean( ( a - b ).^2 );

calculate the mean square error

Calculate the error, square it and calculate the mean! mean( ( a - b ).^2 );

5 Tage ago | 0

Answered

How to keep for loop from over writing variables?

You aren't indexing anything on the left-hand side of all those lines, which is the side where things are stored/overwritten. e....

How to keep for loop from over writing variables?

You aren't indexing anything on the left-hand side of all those lines, which is the side where things are stored/overwritten. e....

6 Tage ago | 0

| accepted

Answered

I have array with different length I would put them in one matrix

t = [t1, t2, t3]; will concatenate them. Obviously you can't put them together as individual columns or rows in a numeric ma...

I have array with different length I would put them in one matrix

t = [t1, t2, t3]; will concatenate them. Obviously you can't put them together as individual columns or rows in a numeric ma...

6 Tage ago | 0

Answered

Wish-list for MATLAB Answer sections.

Do we have to have the 'This website uses cookies...' message at the bottom of the Matlab Answers website every single day when ...

Wish-list for MATLAB Answer sections.

Do we have to have the 'This website uses cookies...' message at the bottom of the Matlab Answers website every single day when ...

7 Tage ago | 1

Answered

Function to fill an array given conditions.

validIdx = pressure >= minVal & pressure < maxVal; datenew = date( validIdx ); phnew = ph( validIdx ); should do this for y...

Function to fill an array given conditions.

validIdx = pressure >= minVal & pressure < maxVal; datenew = date( validIdx ); phnew = ph( validIdx ); should do this for y...

8 Tage ago | 0

| accepted

Answered

Using class object data within another function

Folder_creator_v3( val ); is required to pass val in as an argument to your function, otherwise you are just calling it with no...

Using class object data within another function

Folder_creator_v3( val ); is required to pass val in as an argument to your function, otherwise you are just calling it with no...

9 Tage ago | 0

| accepted

Answered

how can i change x to (x+h)?

It's the same function definition, you just pass in x + h instead of x assuming you have x and h defined at the point you ca...

how can i change x to (x+h)?

It's the same function definition, you just pass in x + h instead of x assuming you have x and h defined at the point you ca...

9 Tage ago | 0

Answered

Find the max in a graph with multiple curves

b=0:5:30; li=(((b'.^3)+1).*(l+0.08*b'))./(((b'.^3)+1)-(0.035.*(l+0.08*b'))); cp=c1.*((c2./li)-c3.*b'-c4).*exp(-c5./li)+c6.*l; ...

Find the max in a graph with multiple curves

b=0:5:30; li=(((b'.^3)+1).*(l+0.08*b'))./(((b'.^3)+1)-(0.035.*(l+0.08*b'))); cp=c1.*((c2./li)-c3.*b'-c4).*exp(-c5./li)+c6.*l; ...

9 Tage ago | 0

Answered

Containers Map saving more than one value

You can save a cell array or an object array as the 'value' for a given key if you set up the key type as 'any' (which is the de...

Containers Map saving more than one value

You can save a cell array or an object array as the 'value' for a given key if you set up the key type as 'any' (which is the de...

10 Tage ago | 0

Answered

reducing resolution of an image

I have no idea what MP means in this context, but doc imresize will resize an image.

reducing resolution of an image

I have no idea what MP means in this context, but doc imresize will resize an image.

10 Tage ago | 0

Answered

shaperead function not available?

I don't know where you came across the shaperead function, but a very quick search shows that it requires the Mapping toolbox...

shaperead function not available?

I don't know where you came across the shaperead function, but a very quick search shows that it requires the Mapping toolbox...

12 Tage ago | 0

| accepted

Answered

how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

https://uk.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html (that was from a 10s search in th...

how to create an vector contains 10000 random values that uniformly distributed with mean 1 and variance 10 ?

https://uk.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html (that was from a 10s search in th...

14 Tage ago | 0

Answered

How to add image overlay in GUIDE ?

(Original comment prepended to the answer for the last comment): The CData is of your original image. If you add a second im...

How to add image overlay in GUIDE ?

(Original comment prepended to the answer for the last comment): The CData is of your original image. If you add a second im...

20 Tage ago | 0

| accepted

Answered

How to use a boolean?

thrust = rocketOn * 1950 And just set rocketOn to true or false as appropriate, e.g. >> rocketOn = true; >> thrust = rocket...

How to use a boolean?

thrust = rocketOn * 1950 And just set rocketOn to true or false as appropriate, e.g. >> rocketOn = true; >> thrust = rocket...

20 Tage ago | 0

| accepted

Answered

GUI Warning: Directory not founded

Don't use global variables. They are very unreliable. Just share data between callbacks instead. It's anyone's guess what mig...

GUI Warning: Directory not founded

Don't use global variables. They are very unreliable. Just share data between callbacks instead. It's anyone's guess what mig...

20 Tage ago | 1

| accepted

Answered

Adding a marker to Data Marker to Heatmap (via imagesc)

I guess you could take the odd approach of making the axes green (when you plot an image the axes should be entirely hidden so t...

Adding a marker to Data Marker to Heatmap (via imagesc)

I guess you could take the odd approach of making the axes green (when you plot an image the axes should be entirely hidden so t...

21 Tage ago | 0

| accepted

Answered

Fastest pairwise row sums

C = repelem( A, size( B, 1 ), 1 ) + repmat( B, size( A, 1 ), 1 ); Should be the same for gpuArrays too. Whether it is fastest ...

Fastest pairwise row sums

C = repelem( A, size( B, 1 ), 1 ) + repmat( B, size( A, 1 ), 1 ); Should be the same for gpuArrays too. Whether it is fastest ...

23 Tage ago | 0

| accepted

Answered

Editing component tag in App Designer

You should have a 'Component Browser' (mine is top right of the screen with default layout) with your components in a tree under...

Editing component tag in App Designer

You should have a 'Component Browser' (mine is top right of the screen with default layout) with your components in a tree under...

27 Tage ago | 0

Answered

Checking for decimals values in input

validateattributes( r, { 'numeric' }, { 'scalar', 'integer' } )

Checking for decimals values in input

validateattributes( r, { 'numeric' }, { 'scalar', 'integer' } )

27 Tage ago | 0

Answered

Reading of Slider into text box GUI

Something like this would do the job, assuming you on;y want to set the text box value when the axes limits are exactly what you...

Reading of Slider into text box GUI

Something like this would do the job, assuming you on;y want to set the text box value when the axes limits are exactly what you...

28 Tage ago | 0

Answered

I want to put an 'ms' in my matlab GUI. But I don't know how to search for the solutions.

sprintf( '%f ms', EncTime * 1000 )

I want to put an 'ms' in my matlab GUI. But I don't know how to search for the solutions.

sprintf( '%f ms', EncTime * 1000 )

30 Tage ago | 0

| accepted

Answered

matlab.unittest.TestCase availability for Matlab version R2012a

It wasn't introduced until Matlab R2013a so is not available in earlier versions.

matlab.unittest.TestCase availability for Matlab version R2012a

It wasn't introduced until Matlab R2013a so is not available in earlier versions.

30 Tage ago | 0

Answered

'disp' equivalent to be used with Matlab Coder

doc fprintf should work with Coder.

'disp' equivalent to be used with Matlab Coder

doc fprintf should work with Coder.

etwa ein Monat ago | 1

| accepted