Beantwortet
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));

fast 13 Jahre vor | 1

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

fast 13 Jahre vor | 0

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

fast 13 Jahre vor | 0

| akzeptiert

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 3

| akzeptiert

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

| akzeptiert

Gelöst


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]; ...

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

Gelöst


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

fast 13 Jahre vor

Beantwortet
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)...

fast 13 Jahre vor | 1

| akzeptiert

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 1

| akzeptiert

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

fast 13 Jahre vor | 0

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

Beantwortet
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]); ...

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 1

| akzeptiert

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 0

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Mehr laden