Answered

How to call xlim and ylim after the most recent zoom?

Hello, Try this: hFig = figure; hAxis = axes(hFig); hPlt = plot(hAxis,rand(100,1)); zoomObj = zoom(hFig); set(zoomO...

How to call xlim and ylim after the most recent zoom?

Hello, Try this: hFig = figure; hAxis = axes(hFig); hPlt = plot(hAxis,rand(100,1)); zoomObj = zoom(hFig); set(zoomO...

10 days ago | 0

| accepted

Question

How to change inputdlg's editbox into a popup menu?

Hellooo dear community! I want to create a small dialog box which contains 2 different popup-menu. Do we have any built-in fun...

13 days ago | 1 answer | 0

Answered

uitable updates behave strangely

I had that problem before, I simply solved it by changing the focus of the tabs while creating the uitables. Please try followin...

uitable updates behave strangely

I had that problem before, I simply solved it by changing the focus of the tabs while creating the uitables. Please try followin...

16 days ago | 0

Answered

Create a column vector from 15 to -25 with a step size of 5

Hi David, Try this: prob04 = sort(-25:5:15,'descend')

Create a column vector from 15 to -25 with a step size of 5

Hi David, Try this: prob04 = sort(-25:5:15,'descend')

16 days ago | 0

Solved

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

18 days ago

Solved

Read a column of numbers and interpolate missing data

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

18 days ago

Answered

Preallocating of Structure without overwriting

I can recommend you to use datastore to process multiple files at once. This will be the faster than using xlsread. Actually it ...

Preallocating of Structure without overwriting

I can recommend you to use datastore to process multiple files at once. This will be the faster than using xlsread. Actually it ...

18 days ago | 0

Answered

find all elements (cells) of a single element (cell) in cell array

Maybe you can try this piece of code: cellSizes = cellfun('prodofsize',c); elementIndices = []; elementValues = []; for i...

find all elements (cells) of a single element (cell) in cell array

Maybe you can try this piece of code: cellSizes = cellfun('prodofsize',c); elementIndices = []; elementValues = []; for i...

18 days ago | 0

Answered

What is the best way to save to .csv without losing precision and with column headers?

Hi, Have you tried the functions writematrix or csvwrite ? csvwrite is not recommended right now but you can try it.

What is the best way to save to .csv without losing precision and with column headers?

Hi, Have you tried the functions writematrix or csvwrite ? csvwrite is not recommended right now but you can try it.

18 days ago | 0

Question

How to enable datacursormode and zoom for only one axes in a figure?

Hello dear community, I have question about the GUI I made programatically with OOP. I am not using GUIDE or AppDesigner. I ...

18 days ago | 1 answer | 1

Answered

How can I include a time delay in Simulink of the below equation?

I think you should calculate the z-transform of the e^(-44s) part. It will become a discrete transport delay in simulink. That ...

How can I include a time delay in Simulink of the below equation?

I think you should calculate the z-transform of the e^(-44s) part. It will become a discrete transport delay in simulink. That ...

22 days ago | 1

| accepted

Answered

how can call a function

You should define the variables you are going to use as inputs of function. The inputs are written in the paranthesis. All outp...

how can call a function

You should define the variables you are going to use as inputs of function. The inputs are written in the paranthesis. All outp...

27 days ago | 0

Answered

Calculate percentage difference between two variables

You should resample one array's elements according to other array's time. Check the below function for this: resample After...

Calculate percentage difference between two variables

You should resample one array's elements according to other array's time. Check the below function for this: resample After...

1 month ago | 0

| accepted

Question

How to create an animated plot of a temperature data with holding on each year?

Hi dear community, I want to create an animated plot of a temperature data. I have 122 files of measured temperatures and I wa...

2 months ago | 1 answer | 0

Answered

how can I print some numbers in ascending order?

Hi, Please check out below bubble sort algorithm: https://www.mathworks.com/matlabcentral/answers/364213-matlab-descending-o...

how can I print some numbers in ascending order?

Hi, Please check out below bubble sort algorithm: https://www.mathworks.com/matlabcentral/answers/364213-matlab-descending-o...

2 months ago | 0

Answered

Dividing a Number with a Vector Results in a new Vector with wrong mean

Because they are not equal mathematically. Suppose that: VectorInit = [a,b,c] meanVectorInit = (a+b+c)/3 VectorTarget = [60...

Dividing a Number with a Vector Results in a new Vector with wrong mean

Because they are not equal mathematically. Suppose that: VectorInit = [a,b,c] meanVectorInit = (a+b+c)/3 VectorTarget = [60...

4 months ago | 2

| accepted

Answered

How to save GUI plots

Before you plot, you should save your figure handle into a variable so that you can put it as an input of saveas function. Ins...

How to save GUI plots

Before you plot, you should save your figure handle into a variable so that you can put it as an input of saveas function. Ins...

4 months ago | 0

Answered

How to make two drop down Dependent

Here is a basic test app I have created. Please read comments carefully. classdef testDropDown < handle properties ...

How to make two drop down Dependent

Here is a basic test app I have created. Please read comments carefully. classdef testDropDown < handle properties ...

4 months ago | 1

| accepted

Answered

Find all lines of a matrix which have a matching pair of values

Basically you can use this: Finds the first row of the pairs' elements seperately as logical indexes. Then adds them together....

Find all lines of a matrix which have a matching pair of values

Basically you can use this: Finds the first row of the pairs' elements seperately as logical indexes. Then adds them together....

4 months ago | 0

Answered

How to scroll and display my GUI in full screen

It seems like in GUIDE you have added an axis and then added a panel on it. Also you added some text boxes and edit boxes on you...

How to scroll and display my GUI in full screen

It seems like in GUIDE you have added an axis and then added a panel on it. Also you added some text boxes and edit boxes on you...

4 months ago | 1

Answered

Error while using a GUI

Hi Tamir, Just change line 116 as follows, definetely it will work: [pathstr,name,ext]=fileparts(fullfile(pathname,file1));

Error while using a GUI

Hi Tamir, Just change line 116 as follows, definetely it will work: [pathstr,name,ext]=fileparts(fullfile(pathname,file1));

4 months ago | 0

| accepted

Answered

How to plot more lines of xtick label

Hi, Have you tried this function from FEX? my_xticklabels

How to plot more lines of xtick label

Hi, Have you tried this function from FEX? my_xticklabels

4 months ago | 0

Answered

How to combine several pieces of code in a For Loop?!

Hello William, Just by changing your y array it works. Try this: xStart = 0; xFinishArray = 1:4; y = [0,2,0,2,0,2]; hF...

How to combine several pieces of code in a For Loop?!

Hello William, Just by changing your y array it works. Try this: xStart = 0; xFinishArray = 1:4; y = [0,2,0,2,0,2]; hF...

4 months ago | 0

Answered

Lookup tables for ICE data mapping

What do you mean by slicing? Unfortunetely I can't look at the text file but as far as I understand you have a set of data for e...

Lookup tables for ICE data mapping

What do you mean by slicing? Unfortunetely I can't look at the text file but as far as I understand you have a set of data for e...

6 months ago | 1

| accepted

Answered

HEEEEELP....... Array cells comparing....

Hi, Look at the function ismember to search if your element exists in another array. Please share your arrays as an example a...

HEEEEELP....... Array cells comparing....

Hi, Look at the function ismember to search if your element exists in another array. Please share your arrays as an example a...

6 months ago | 1

| accepted

Answered

My for loop gives an error

You can put your symbolic 4x4 matrices into a cell array. Also your for loop is wrongly defined like for S = [1 2 3...]. You s...

My for loop gives an error

You can put your symbolic 4x4 matrices into a cell array. Also your for loop is wrongly defined like for S = [1 2 3...]. You s...

6 months ago | 1

| accepted

Answered

Error finding matrix indices where elements obey a condition

Hi Ferda, Please see my comments below: % first convert it to double array: A = double(input_of_hidden_layer2); % indexing...

Error finding matrix indices where elements obey a condition

Hi Ferda, Please see my comments below: % first convert it to double array: A = double(input_of_hidden_layer2); % indexing...

6 months ago | 0

| accepted

Answered

Indexing to cell arrays

Try this: X = [0.1 3 0.2; 2 5 4;1 0.3 5]; [xlocs,ylocs] = find(X<1 & X>0); % locations of values, you have 3 values. xlocs' f...

Indexing to cell arrays

Try this: X = [0.1 3 0.2; 2 5 4;1 0.3 5]; [xlocs,ylocs] = find(X<1 & X>0); % locations of values, you have 3 values. xlocs' f...

6 months ago | 0

Answered

MATLAB GUI Radiobutton Control

Hi Oğuzhan, You can just simply do this: When option1 selected, enable edit1 and disable edit2. (radiobutton1 callback) set...

MATLAB GUI Radiobutton Control

Hi Oğuzhan, You can just simply do this: When option1 selected, enable edit1 and disable edit2. (radiobutton1 callback) set...

6 months ago | 0

| accepted

Answered

How to group an array and then replace each group with different numbers?

Try this: A = [1 1 1 0 0 0 1 0 0 1 0 1 1 0 0]; C = [4, 5, 6, 3]; A(end+1) = 1; locRise = find([0 diff(A == 0) > 0]); loc...

How to group an array and then replace each group with different numbers?

Try this: A = [1 1 1 0 0 0 1 0 0 1 0 1 1 0 0]; C = [4, 5, 6, 3]; A(end+1) = 1; locRise = find([0 diff(A == 0) > 0]); loc...

6 months ago | 0