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 months ago | 0

| accepted

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 months 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 months 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 months 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...

5 months 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.

5 months 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...

5 months 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...

5 months 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...

5 months 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 ...

5 months 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 ...

6 months 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...

6 months 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

6 months 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...

6 months 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); ...

6 months 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...

6 months 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...

6 months 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 =...

6 months 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...

6 months 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...

6 months ago | 0

Answered

how to store and display values coming from the for loop to an array variable.

Aishwarya - if each iteration of your loop creates a variable (of some kind) that you want to store or save for further processi...

how to store and display values coming from the for loop to an array variable.

Aishwarya - if each iteration of your loop creates a variable (of some kind) that you want to store or save for further processi...

6 months ago | 0

Answered

Graph tiltle with multiple variables over 2 lines

Franc - try using sprintf to create one or more lines that you can use in your title. For example, myTitle = sprintf('first row...

Graph tiltle with multiple variables over 2 lines

Franc - try using sprintf to create one or more lines that you can use in your title. For example, myTitle = sprintf('first row...

6 months ago | 0

| accepted

Answered

How do i sum the total elements in a vector, not whats in each element

caitlin - if your movements are in a matrix, say nx2, where each row is a coordinate for the movement, then the number of moveme...

How do i sum the total elements in a vector, not whats in each element

caitlin - if your movements are in a matrix, say nx2, where each row is a coordinate for the movement, then the number of moveme...

6 months ago | 0

| accepted

Answered

How to add cell array elements iteratively?

Hassan - first, please rename the sum variable since there is a built-in MATLAB function of the same name. If you want to add al...

How to add cell array elements iteratively?

Hassan - first, please rename the sum variable since there is a built-in MATLAB function of the same name. If you want to add al...

6 months ago | 0

| accepted

Answered

Index in position 2 exceeds array bounds (must not exceed 25).

benjamin - isn't H of length Lx (or Ly since identical) and is an array? Treating it like a matrix as H(a,b) would then lead to ...

Index in position 2 exceeds array bounds (must not exceed 25).

benjamin - isn't H of length Lx (or Ly since identical) and is an array? Treating it like a matrix as H(a,b) would then lead to ...

6 months ago | 0

Answered

How do I prompt a user to input a number of values for their future inputts?

Mallard - use a for loop. For example, numYears= input('please enter number of years: '); cashFlows = zeros(numYears, 1); i...

How do I prompt a user to input a number of values for their future inputts?

Mallard - use a for loop. For example, numYears= input('please enter number of years: '); cashFlows = zeros(numYears, 1); i...

6 months ago | 1

| accepted

Answered

Append matrix with subsequent images

Kevin - you may want to consider not using global variables. Instead use the handles structure to save the data that you want ot...

Append matrix with subsequent images

Kevin - you may want to consider not using global variables. Instead use the handles structure to save the data that you want ot...

6 months ago | 0

| accepted

Answered

i get error using plot and error in color/lineup and i don't know what to do i have already attached the file if someone wanna see i want my program to run and show the high pass plot

Mohammad - your attached file does not include the pushbutton2_Callback nor do I see any reference to an f or h. I can reproduce...

i get error using plot and error in color/lineup and i don't know what to do i have already attached the file if someone wanna see i want my program to run and show the high pass plot

Mohammad - your attached file does not include the pushbutton2_Callback nor do I see any reference to an f or h. I can reproduce...

6 months ago | 0

Answered

fprintf not displaying in loop

hubert - you may need to clarify what you mean by if its outside of the loop, it prints fine, but not inside. If I run your code...

fprintf not displaying in loop

hubert - you may need to clarify what you mean by if its outside of the loop, it prints fine, but not inside. If I run your code...

6 months ago | 0

Answered

how to get sequence of values for 'u' in the for loop using the 'save control.mat u' syntax

Sharath - consider collecting all of the u values in a matrix and then saving it to file afterwards. For example, % your code ...

how to get sequence of values for 'u' in the for loop using the 'save control.mat u' syntax

Sharath - consider collecting all of the u values in a matrix and then saving it to file afterwards. For example, % your code ...

6 months ago | 0

| accepted