2,694 total contributions since 2014

Professional Interests: Software Engineering, Target Tracking, Video Streaming apps

Answered

Matlab GUI changing image brightness using slider

Diana - the problem may be with this line of code imbright=(handles.axes1)+val; Note that you are adding a value val (calculat...

Matlab GUI changing image brightness using slider

Diana - the problem may be with this line of code imbright=(handles.axes1)+val; Note that you are adding a value val (calculat...

21 hours ago | 0

Answered

How to iterate xa from 0 to 1 with steps of 0.05 in the function r=F*(k*C*(1-xa))/(1+K*C*(1-xa)). All variables are known except for r.

Marina - try m = zeros(20,1); k = 1; for x = 0:0.05:1 m(k) = F*(k_kin*C*(1-x))/(1+k_ads*C*(1-x)) k = k + 1; end e...

How to iterate xa from 0 to 1 with steps of 0.05 in the function r=F*(k*C*(1-xa))/(1+K*C*(1-xa)). All variables are known except for r.

Marina - try m = zeros(20,1); k = 1; for x = 0:0.05:1 m(k) = F*(k_kin*C*(1-x))/(1+k_ads*C*(1-x)) k = k + 1; end e...

1 day ago | 0

Answered

How can I rename images in a folder

Ronny - let's assume that you have a list of file names (with or without a full path to the file). We can use strrep and movefil...

How can I rename images in a folder

Ronny - let's assume that you have a list of file names (with or without a full path to the file). We can use strrep and movefil...

1 day ago | 0

| accepted

Answered

how to get the x value for a given y value?

ahmed - your code assumes that there is an x value that is identical to xi z=find(x==xi); This need not be true. And comparing...

how to get the x value for a given y value?

ahmed - your code assumes that there is an x value that is identical to xi z=find(x==xi); This need not be true. And comparing...

2 days ago | 0

| accepted

Answered

Cut and plot Audio Signal (.wav) in specific time

Apridho - you may want to use audioread to read the data from the wav file [y,Fs] = audioread('myAudioData.wav'); Fs will be t...

Cut and plot Audio Signal (.wav) in specific time

Apridho - you may want to use audioread to read the data from the wav file [y,Fs] = audioread('myAudioData.wav'); Fs will be t...

3 days ago | 0

Answered

Storing data for "for loop"

Khang - don't create variables just for the sake of having variables. If all of your L arrays are of the same dimension, then ju...

Storing data for "for loop"

Khang - don't create variables just for the sake of having variables. If all of your L arrays are of the same dimension, then ju...

4 days ago | 0

Answered

How to impliment a covergence condition?

abdel - perhaps your condtion would be if abs(A(k,i) - A(k+1,i)) <= 0.0001 % do nothing else % replace your value e...

How to impliment a covergence condition?

abdel - perhaps your condtion would be if abs(A(k,i) - A(k+1,i)) <= 0.0001 % do nothing else % replace your value e...

4 days ago | 0

| accepted

Answered

How to apply cellular automata to an array of multiple colours?

Obi - presumably your matrix is RxCx3 and that red is (255,0,0), green is (0,255,0), blue is (0,0,255), and white is (255,255,25...

How to apply cellular automata to an array of multiple colours?

Obi - presumably your matrix is RxCx3 and that red is (255,0,0), green is (0,255,0), blue is (0,0,255), and white is (255,255,25...

5 days ago | 0

Answered

Error using - Matrix dimensions must agree. Error in Eigenfaces (line 14) t=double(z(i,:))-m;

Bereket - the error message is telling you that the matrices upon which you are executing the difference (of), are of different ...

Error using - Matrix dimensions must agree. Error in Eigenfaces (line 14) t=double(z(i,:))-m;

Bereket - the error message is telling you that the matrices upon which you are executing the difference (of), are of different ...

5 days ago | 0

Answered

How do I read raw text from a webpage (ESPN Fantasy Baseball)?

James - as a first step, try using webread to read the data from the URL which you can then pass to jsondecode like urlToFetch ...

How do I read raw text from a webpage (ESPN Fantasy Baseball)?

James - as a first step, try using webread to read the data from the URL which you can then pass to jsondecode like urlToFetch ...

5 days ago | 1

Answered

Getting Pop-up menu output as Excel sheet for plotting

Varun - I don't understand this line of code data111=xlsread(handles.popupmenuX,' data11') Why are you using the handle of the...

Getting Pop-up menu output as Excel sheet for plotting

Varun - I don't understand this line of code data111=xlsread(handles.popupmenuX,' data11') Why are you using the handle of the...

5 days ago | 0

Answered

Using pop-up menu to graph different scenarios

William - there is no need to dynamically create a variable in the base work space to handle the selection in the pop-up menu. I...

Using pop-up menu to graph different scenarios

William - there is no need to dynamically create a variable in the base work space to handle the selection in the pop-up menu. I...

5 days ago | 0

Answered

errors in spring mass gui code

William - the code around the error is y=V; %V is the position array of the graph that is graphed in axes2 for k=V(1):5:length...

errors in spring mass gui code

William - the code around the error is y=V; %V is the position array of the graph that is graphed in axes2 for k=V(1):5:length...

5 days ago | 1

| accepted

Answered

How can I periodically update an axes plot in Matlab GUI?

Francesco - while the following code will pass in the handles structure handles.timer = timer('Name','MyTimer', ...

How can I periodically update an axes plot in Matlab GUI?

Francesco - while the following code will pass in the handles structure handles.timer = timer('Name','MyTimer', ...

5 days ago | 1

| accepted

Answered

error using trapz function

mitis - is the error message Subscript indices must either be real positive integers or logicals. Error in ipermute (line 22...

error using trapz function

mitis - is the error message Subscript indices must either be real positive integers or logicals. Error in ipermute (line 22...

9 days ago | 0

Answered

About the radio button in the app designer

apple - why would you have only one radio button? Perhaps you can use a checkbox instead.

About the radio button in the app designer

apple - why would you have only one radio button? Perhaps you can use a checkbox instead.

9 days ago | 0

Answered

How to remove invalid left hand side of assignment, invalid "=" usage might be invalid matlab syntax and invalid character(s) in my code? Because this is my final project so i need to submit this. Really need help please.my algorithm also attached.

Hamza - has your code been formatted for LaTeX? Is that why there are references to mathcal? What is N supposed to be defined as...

How to remove invalid left hand side of assignment, invalid "=" usage might be invalid matlab syntax and invalid character(s) in my code? Because this is my final project so i need to submit this. Really need help please.my algorithm also attached.

Hamza - has your code been formatted for LaTeX? Is that why there are references to mathcal? What is N supposed to be defined as...

9 days ago | 0

Answered

How can I write a smart TicTacToe code?

Christian - what are the inputs f_user1 and f_user2? Are one of these the functions that you will create? As for adding intelli...

How can I write a smart TicTacToe code?

Christian - what are the inputs f_user1 and f_user2? Are one of these the functions that you will create? As for adding intelli...

9 days ago | 0

Answered

Conway's Game of Life implementation

Limbert - I think that part of the problem might be with how your if and elseif statements are not being properly "ended". For e...

Conway's Game of Life implementation

Limbert - I think that part of the problem might be with how your if and elseif statements are not being properly "ended". For e...

9 days ago | 0

| accepted

Answered

how to full fill the diagonal of a matrix by a vector

Ahmed - try using a = [1 2 3 0 0]'; A = cell2mat(arrayfun(@(x)circshift(a,x-1),1:length(a), 'UniformOutput', false)); We use ...

how to full fill the diagonal of a matrix by a vector

Ahmed - try using a = [1 2 3 0 0]'; A = cell2mat(arrayfun(@(x)circshift(a,x-1),1:length(a), 'UniformOutput', false)); We use ...

16 days ago | 1

Answered

How can I index where I found the contents of strfind?

Nicholas - perhaps something liek the following could be used if the MyStructure is similar to yours. MyStructure = []; for k ...

How can I index where I found the contents of strfind?

Nicholas - perhaps something liek the following could be used if the MyStructure is similar to yours. MyStructure = []; for k ...

20 days ago | 0

Answered

Plotting Space-Time Function in MATLAB?

Andong - I'm not sure if the below is exactly what you are looking for...when I tried it, it wasn't entirely obvious the changes...

Plotting Space-Time Function in MATLAB?

Andong - I'm not sure if the below is exactly what you are looking for...when I tried it, it wasn't entirely obvious the changes...

20 days ago | 0

| accepted

Answered

im stuck on making a layered matrix

Tristan - why not use a for loop surround = 1; for k = 2:5 surround = surroundWith(surround, k); end

im stuck on making a layered matrix

Tristan - why not use a for loop surround = 1; for k = 2:5 surround = surroundWith(surround, k); end

21 days ago | 1

| accepted

Answered

Trying to integrate sinx using the integrate function but when I plot the integral, instead of plotting from -1 to 1 it plots from 0 to 2. Does anyone know why this happens?

Guillermo - I'm guessing it is the y-axis limits that you want to be between -1 and 1? Why is the minimum value, a, fixed but th...

Trying to integrate sinx using the integrate function but when I plot the integral, instead of plotting from -1 to 1 it plots from 0 to 2. Does anyone know why this happens?

Guillermo - I'm guessing it is the y-axis limits that you want to be between -1 and 1? Why is the minimum value, a, fixed but th...

21 days ago | 1

Answered

Help using While loop

Charles - I think that you could use a while or for loop on this code W = Na*MM(1,1,1); Q = Ca*MM(2,1,1); E = Si*MM(3,1,1); ...

Help using While loop

Charles - I think that you could use a while or for loop on this code W = Na*MM(1,1,1); Q = Ca*MM(2,1,1); E = Si*MM(3,1,1); ...

23 days ago | 0

| accepted

Answered

plot columns of matrix

Filip - from plot, plot(Y) creates a 2-D line plot of the data in Y versus the index of each value. ... If Y is a matrix, th...

plot columns of matrix

Filip - from plot, plot(Y) creates a 2-D line plot of the data in Y versus the index of each value. ... If Y is a matrix, th...

23 days ago | 0

Answered

How do I make a user defined function in MATLAB to determine the volume of a revolving solid using the disk method?

By user-defined function, I suspect that they are just asking you to create a function with a specific signature (input and outp...

How do I make a user defined function in MATLAB to determine the volume of a revolving solid using the disk method?

By user-defined function, I suspect that they are just asking you to create a function with a specific signature (input and outp...

26 days ago | 0

Answered

Trapezoidal rule for loop

Nima - perhaps try for n = [20,50,100,150,400] f = @(x)6*(cos(x/2)) .* (sin(x/2)).^2; % Defining given function a =...

Trapezoidal rule for loop

Nima - perhaps try for n = [20,50,100,150,400] f = @(x)6*(cos(x/2)) .* (sin(x/2)).^2; % Defining given function a =...

26 days ago | 1

Answered

Error using * Inner matrix dimensions must agree urgent help please.

Or - the error is due to the following multiplciation air_vec*normal_vec where both arrays/vectors are 3x1 and so the error me...

Error using * Inner matrix dimensions must agree urgent help please.

Or - the error is due to the following multiplciation air_vec*normal_vec where both arrays/vectors are 3x1 and so the error me...

26 days ago | 0

| accepted

Answered

Error : Function definition is misplaced or improperly nested.

suoh - I think that one problem might be with your "else if". In MATLAB, there isn't a space and so this is just "elseif". The w...

Error : Function definition is misplaced or improperly nested.

suoh - I think that one problem might be with your "else if". In MATLAB, there isn't a space and so this is just "elseif". The w...

26 days ago | 0