Answered

Data sharing between two GUIs

You can use setappdata and getappdata http://www.mathworks.com/matlabcentral/answers/95443

Data sharing between two GUIs

You can use setappdata and getappdata http://www.mathworks.com/matlabcentral/answers/95443

10 years ago | 0

Answered

IF statement inside a push button

Assuming rest of the code is right mon1= str2num(get(handles.m1,'string')); The first thing I'll think is that you're get...

IF statement inside a push button

Assuming rest of the code is right mon1= str2num(get(handles.m1,'string')); The first thing I'll think is that you're get...

10 years ago | 0

| accepted

Answered

How to pick an integer in a box using up and down arrows in a gui

You can use button with symbols + or -, and add functions like adding or subtracting as a feature. Something like this (very ...

How to pick an integer in a box using up and down arrows in a gui

You can use button with symbols + or -, and add functions like adding or subtracting as a feature. Something like this (very ...

10 years ago | 1

| accepted

Answered

help with numerical integration

First thing: what are you trying to do with y and r? Your r will be empty as the last value in defining r is a vector. Can yo...

help with numerical integration

First thing: what are you trying to do with y and r? Your r will be empty as the last value in defining r is a vector. Can yo...

10 years ago | 0

Answered

Finding Mean of a repeated entries Using Matlab.

b = [u,accumarray(ix,zz(:,1))./accumarray(ix,1)]; The second accumarray will be (ix,1) not (ix,2)

Finding Mean of a repeated entries Using Matlab.

b = [u,accumarray(ix,zz(:,1))./accumarray(ix,1)]; The second accumarray will be (ix,1) not (ix,2)

10 years ago | 1

| accepted

Answered

How to merge different customized figures together?

set(hFig, 'Position', [100 250 300 5*80]); for jj = 1:5 h1 = subplot(5,1,jj); % hAxes = set(h1,'XTick',[-1:1:...

How to merge different customized figures together?

set(hFig, 'Position', [100 250 300 5*80]); for jj = 1:5 h1 = subplot(5,1,jj); % hAxes = set(h1,'XTick',[-1:1:...

10 years ago | 0

| accepted

Answered

beginner questions about symbols used in formula

The fullstop (.) operator is for element-wise operation. For example: A = [1 2 3 4]; B = [5 6 7 8]; AS you can see t...

beginner questions about symbols used in formula

The fullstop (.) operator is for element-wise operation. For example: A = [1 2 3 4]; B = [5 6 7 8]; AS you can see t...

10 years ago | 1

Answered

problem using the find function

row and col are the indices in the matrix which have the value you need. Find function just finds the indices which satisfy the...

problem using the find function

row and col are the indices in the matrix which have the value you need. Find function just finds the indices which satisfy the...

10 years ago | 0

Answered

Call a matrix in a matrix

You can have cell like this: B = rand(3); C = rand(3); A{1} = B; A{2} = C;

Call a matrix in a matrix

You can have cell like this: B = rand(3); C = rand(3); A{1} = B; A{2} = C;

10 years ago | 0

| accepted

Answered

Vector Equation with scalars?

a = 3; b = 4; x = -3:0.2:2; y = 8*(a^2)./(x.^2+b^2);

Vector Equation with scalars?

a = 3; b = 4; x = -3:0.2:2; y = 8*(a^2)./(x.^2+b^2);

10 years ago | 0

| accepted

Answered

how to write an equation with different period of time

w_t = [25*T 50 250-50*t]; t_range = [0 2 4]; W = w_t(find(t > t_range,1,'last'));

how to write an equation with different period of time

w_t = [25*T 50 250-50*t]; t_range = [0 2 4]; W = w_t(find(t > t_range,1,'last'));

10 years ago | 0

Answered

How do I get the Command Window to recognize variables created in a function?

Because you have to do something like this on the command window: [K,T] = KTBC(n) KTBC is a function that take an input ...

How do I get the Command Window to recognize variables created in a function?

Because you have to do something like this on the command window: [K,T] = KTBC(n) KTBC is a function that take an input ...

10 years ago | 1

| accepted

Answered

How to use the "Input" command-- specific problem help

The input command ask for a value from the user, for example A = input('Enter value for h: ') will show on command prom...

How to use the "Input" command-- specific problem help

The input command ask for a value from the user, for example A = input('Enter value for h: ') will show on command prom...

10 years ago | 0

Answered

How to resolve ODE system in Matlab using numerical method Runge-Kuta?

First You'll have to make a function for your problem. This function take (time and Y) and will return dy function dy = myf...

How to resolve ODE system in Matlab using numerical method Runge-Kuta?

First You'll have to make a function for your problem. This function take (time and Y) and will return dy function dy = myf...

10 years ago | 0

Answered

how to do a graph

m = zeros(30,1); a = m; for i=1:30 m(i) = 400*(1.1^i); a(i) = 120*(1.2*i); end plot(m); hold on; plot(1:3...

how to do a graph

m = zeros(30,1); a = m; for i=1:30 m(i) = 400*(1.1^i); a(i) = 120*(1.2*i); end plot(m); hold on; plot(1:3...

10 years ago | 0

Answered

set limits using xlim for strings

set(gca,'XTick',1:12,'XTickLabel',{'Jan','Feb','Mar','Apr' .... etc})

set limits using xlim for strings

set(gca,'XTick',1:12,'XTickLabel',{'Jan','Feb','Mar','Apr' .... etc})

10 years ago | 0

| accepted

Answered

Why do I get an 'Index needs to be positive or logical' error?

Sometimes in matlab, when doing floating point operations which should result in an integer, deviate from it slightly. For examp...

Why do I get an 'Index needs to be positive or logical' error?

Sometimes in matlab, when doing floating point operations which should result in an integer, deviate from it slightly. For examp...

10 years ago | 0

| accepted

Answered

Replace specific numbers in a matrix

Lets say your matrix is called A, then A(A>90) = Inf; That simple :)

Replace specific numbers in a matrix

Lets say your matrix is called A, then A(A>90) = Inf; That simple :)

10 years ago | 0

| accepted

Answered

Transforming vector into triangular matrix

Lets call it A Then A_new = repmat(A,1,48); A_new = tril(A);

Transforming vector into triangular matrix

Lets call it A Then A_new = repmat(A,1,48); A_new = tril(A);

10 years ago | 0

| accepted

Answered

Big O Complexity for Matlab code - Sum of Matrix Operation

Matlab sum without specification of dimension, for a matrix, will be for the column. However for a vector, either row or colu...

Big O Complexity for Matlab code - Sum of Matrix Operation

Matlab sum without specification of dimension, for a matrix, will be for the column. However for a vector, either row or colu...

10 years ago | 0

Answered

Help with the output of my function

This is because when you input t as a vector, unless all of the values in vector satisfy the condition, it will not go through a...

Help with the output of my function

This is because when you input t as a vector, unless all of the values in vector satisfy the condition, it will not go through a...

10 years ago | 0

Answered

save matdata1 Error using save Unable to write file matdata1: permission denied.

This might be because you dont have permission to write in that folder. Try a different directory and see if it still doesn't w...

save matdata1 Error using save Unable to write file matdata1: permission denied.

This might be because you dont have permission to write in that folder. Try a different directory and see if it still doesn't w...

10 years ago | 0

| accepted

Answered

How can I calcuate the distance from two selected points?

imdistline Matlab documentation: http://www.mathworks.com/help/images/ref/imdistline.html

How can I calcuate the distance from two selected points?

imdistline Matlab documentation: http://www.mathworks.com/help/images/ref/imdistline.html

10 years ago | 1

| accepted

Answered

How can I solve a simplest order 4 differential equation by 4th order Rung Kutta in Matlab?

See this: http://www.mathworks.com/help/matlab/ref/ode45.html There are few examples there as well to help you through

How can I solve a simplest order 4 differential equation by 4th order Rung Kutta in Matlab?

See this: http://www.mathworks.com/help/matlab/ref/ode45.html There are few examples there as well to help you through

10 years ago | 0

Answered

Replace zero in a matrix with value in previous row

Lets say your matrix is A [m,n] = size(A); An = A'; valx = find(~An); % This will give you zeros elements linear inde...

Replace zero in a matrix with value in previous row

Lets say your matrix is A [m,n] = size(A); An = A'; valx = find(~An); % This will give you zeros elements linear inde...

10 years ago | 0

Answered

Changing excel range reference

Your xlRange will produce string 'sRowRef:lRowRef' not 'D2:D49'. You should try: xlRange = [sRowRef ':' lRowRef];

Changing excel range reference

Your xlRange will produce string 'sRowRef:lRowRef' not 'D2:D49'. You should try: xlRange = [sRowRef ':' lRowRef];

10 years ago | 0

| accepted

Answered

how can I copy multiple Matlab.fig files, each with multiple subplots, into a single plot

You need to get handle for all the subplots in each figure. % First open a new figure hh = figure; % Open First F...

how can I copy multiple Matlab.fig files, each with multiple subplots, into a single plot

You need to get handle for all the subplots in each figure. % First open a new figure hh = figure; % Open First F...

10 years ago | 0

Answered

how to jump from one box to another in Matlab GUI?

Setting tab order: http://www.mathworks.com/help/matlab/creating_guis/setting-tab-order.html http://www.mathworks.com/help...

how to jump from one box to another in Matlab GUI?

Setting tab order: http://www.mathworks.com/help/matlab/creating_guis/setting-tab-order.html http://www.mathworks.com/help...

10 years ago | 0

Answered

Redirect command window messages to GUI window

You can definitely do that. A small window and then keep on using 'set' to update that. However, when you say that there is n...

Redirect command window messages to GUI window

You can definitely do that. A small window and then keep on using 'set' to update that. However, when you say that there is n...

10 years ago | 1