Answered
How to add a step size of 2
Hi Tony, Either type *help for* in the MATLAB command window to get information on *for* loop syntax, or visit the following ...

12 years ago | 0

Answered
I get an error msg "index exceeds matrix dimensions". How can i solve this problem??? my code is given below..
Hi vinaya, Put a breakpoint at the line that is causing the problem. You have identified already where that is, so that is g...

12 years ago | 0

Answered
How to track changes and match columns in a cell (MATLAB)
Hi Maria, When you say *cell of 3 different columns* do you really mean a matrix with N rows and 3 columns? Or do you mean a...

12 years ago | 0

| accepted

Answered
problem with understanding the operators and special characters
Hi farzad, The first line, *MatDir=pwd;* is simply setting the local variable *MatDir* to the current working directory. Try...

12 years ago | 0

Answered
Make the location of bar graph in axes 1??
Hi Mahirah, If you know the handle to the axes ( *axes1_handle* ) that you wish to add the bar graph to, you can do so as fol...

12 years ago | 0

Answered
Finding the array location in the matrix
Hi Mohammad, If the input is a vector, then you can do the following: [val,idx] = max(b); where *val* will be the max...

12 years ago | 0

| accepted

Answered
trying to create a table with entered data
Hi Zack, Perhaps rather than start with code to get input from the user, start with a sample matrix of data and go from there...

12 years ago | 0

Answered
Finding values based on coordinates
Hi Daniel, The quick (and so not necessarily efficient way!) is to start with the latitude and longitude pair from the first ...

12 years ago | 0

Answered
How can I convert a numeric matrix(a) to a 0 and 1 matrix(b)?
Hi Mohammed, Why not just use a simple loop? r=size(a,1); % get the number of rows in a (first dimension,1) b=zer...

12 years ago | 0

| accepted

Answered
Question about length function
*length* returns the maximum of n and m: >> help length length Length of vector. length(X) returns the len...

12 years ago | 0

| accepted

Answered
Matrix from a for FOR loop with IF conditioning
Hi Chris, I'm guessing that *n* should be *3* in this example, and that in the code *D* is set (at some point) with *A*. S...

12 years ago | 0

Answered
Where am I going wrong?
Hi Chris, You should add some breakpoints to your program and step through the code to see what is happening at line 27. Whe...

12 years ago | 0

Answered
hello ...i want to save the values entered in the editbox of matlab gui...
Hi Kiran, A relatively simple solution would be to capture the event where the GUI/figure closes, grab any and all data that ...

12 years ago | 0

Answered
Simple solution to manuplate matrix
Hi saif, From your code example, it appears that you wish only to replace the last three elements of A with the three element...

12 years ago | 0

| accepted

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

12 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

12 years ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

12 years ago

Answered
Raising a vector to the power of another vector
Hi Kimberly, First thing is that you should figure out the dimensions of your output matrix. Presumably it will be something...

12 years ago | 0

Solved


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

12 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

12 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

12 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

12 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

12 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

12 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

12 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

12 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

12 years ago

Answered
Matlab GUIDE Display Temp Sensor Data
Hi Leah, If you have the handle to the text box, then you can simply set the string text within that box to your temperature:...

12 years ago | 0

Answered
For Loop or filter to select equal data in a data file ?
Hi Nuno, I think that you are on the right track with the for loop. If the names of each record is pa1,pa2,pa3,.. which seem...

12 years ago | 0

Answered
hello.. i have a program in m-file ...n i want to run that file when gui pushbutton is clicked..and the output of that m-file should be displayed in edit box..... plz tell me the solution ..... i m doing m.tech thesis on matlab gui .......
Hi monu, I think what you want to do is invoke your program (in the m-file) from a callback that is associated with your butt...

12 years ago | 0

| accepted

Load more