Respondida
Find number of zeros in a part of a matrix
A = [1 2 2 2 2 2 0 2 2 2 0 3 0 0 4 5 6 7 0 0 8]; numZeros = sum(~A(5:10));

más de 12 años hace | 1

Respondida
How to repopulate popupmenu by deleting old data.
set(popup_handle,'String','') That should do the trick.

más de 12 años hace | 0

Respondida
how to print output in gui
You could create a editbox in a figure and display the value there: Example: fh = figure; prompt = {1 3}; eh = uic...

más de 12 años hace | 0

| aceptada

Resuelto


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

más de 12 años hace

Respondida
Problem with a matlab question
There are multiple ways you can do this. The first involves a *for loop* and, while it might require more lines of code, is prob...

más de 12 años hace | 0

| aceptada

Respondida
importdata vs xlsread to read an excel file
If you want to find out, try timing the operation of each function: tic; xlsread('my_file.xlsx'); toc tic; importdat...

más de 12 años hace | 3

| aceptada

Resuelto


normalize group of numbers to integers
Hi guys! I have a group of 4 numbers x,y,z,w which comes from 4 integers multiplied with a common factor. [x,y,z,w] = c [i,j,k,...

más de 12 años hace

Respondida
How can I keep figure boxes from popping up while running script.
Are you wanting to save the plot created on each pass of your loop? If so, just move the figure creation line out of the loop. A...

más de 12 años hace | 0

| aceptada

Resuelto


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

más de 12 años hace

Resuelto


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

más de 12 años hace

Resuelto


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

más de 12 años hace

Resuelto


Find the Kronecker Tensor Product without using KRON
The Kronecker Tensor Product is the result of multiplying all elements of a matrix with each of the elements of another matrix. ...

más de 12 años hace

Resuelto


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

más de 12 años hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

más de 12 años hace

Resuelto


Use of regexp
* Given a string, containing several sentences, such as: * 'I played piano. John played football. Anita went home. Are you safe...

más de 12 años hace

Respondida
how can i add noise to the image??
Do you have the image processing toolbox? If so, you might find *imnoise* useful. http://www.mathworks.com/help/images/ref/im...

más de 12 años hace | 0

Resuelto


exactly?
given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

más de 12 años hace

Respondida
Can a function inside a parent code access the full workspace of that parent code?
A nested function can access the variables stored in the workspace of its caller function: function x = outer_function(a,b)...

más de 12 años hace | 1

| aceptada

Resuelto


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

más de 12 años hace

Respondida
How to include a conditional function inside a "for k = 1 : 200" loop?
Yes, you need to pass the k value, and any other values used from the calling function, into your function that you call within ...

más de 12 años hace | 1

| aceptada

Respondida
how can store string and number in a matrix?
You can use a cell array for storing values of differing datatypes: A = {'matlab' 'ver' 12} You can also use a cell array ...

más de 12 años hace | 0

Resuelto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

más de 12 años hace

Respondida
Is it possible to configure data in a excel file from matlab? If so, How can I do it?
Do you want the timestamp (22:57:13) to be split into separate rows or placed all in the same column? Either way, a combinati...

más de 12 años hace | 0

Respondida
Need help inproveing function...
Does this do what you want? >> x = [1 1 3 5 4 6 6 1 9 1 1 8 2 5 5 5 2 7 7 2 2 2]; >> idx = cumsum([1 diff(x) ~= 0]); ...

más de 12 años hace | 0

| aceptada

Respondida
How to open an axes object inside a GUI ?
If you're asking if this sort of functionality is available without doing your own coding when interacting with axes in figure w...

más de 12 años hace | 1

| aceptada

Respondida
export output from a linear regression to Excel
You could store your data in a cell array where the first row of elements are the headings (coefficients, r^2, etc.). Then that ...

más de 12 años hace | 0

| aceptada

Respondida
when using genetic algorithm, the number of variables(nvar) is dependant on the row vector(x) that my fitness function accepts. How can I deal with that?
Have you looked into the *varargin* function? help varargin You could then parse the arguments contained within varargin...

más de 12 años hace | 0

Resuelto


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

más de 12 años hace

Resuelto


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

más de 12 años hace

Resuelto


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

más de 12 años hace

Cargar más