Réponse apportée
how to save cell array which not have equal row in each column to .csv
function cell2csv(c,filename) % Writes a cell array of 1D arrays to a csv file c = c(:); fid = fopen(filename...

environ 9 ans il y a | 0

Réponse apportée
How to curve fit a transcendental function to data?
Set k0 = [k1_0;k2_0;k3_0] to a vector of initial values for your unknown parameters. Write your function as: predic...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
problem with Matrix Multiplication
Note that in Matlab, vectors are matrices of column or row shape and. A 2 by 2 matrix can only be multiplied by a column vector...

environ 9 ans il y a | 0

Réponse apportée
Problem with fmincon: nonlcon
To transfer the extra inputs to DiagCAW11_constraints you should use an anonymous function: Make sure that RC, r, bsum are de...

plus de 9 ans il y a | 0

Réponse apportée
cumsum function for seperate time
Interesting problem. Here is one possible solution: dates = {'01/01/1975'; '05/01/1975'; '25/01/1975'; '05/02/1975';... ...

plus de 9 ans il y a | 0

Réponse apportée
How to replace a variable or function with another variable or function ?
You could define an anonymous function f(x): f = @(x) x.*(x.^2-1); Note the '.' before the * and ^operators. This lets t...

presque 10 ans il y a | 2

Réponse apportée
How to reset variables before each iteration
Here is an example that clears all variables except b and c: % Fist create some variables a = 1; b = 2; c = 3; d = 4; ...

presque 10 ans il y a | 0

A résolu


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

presque 10 ans il y a

A soumis


read_excel_columns(filename,sheet,columns,firstrow,lastrow)
Read selected columns from a large Excel file using ActiveX

environ 10 ans il y a | 1 téléchargement |

5.0 / 5

Réponse apportée
How do I read only specific columns in from an Excel file, not consecutive columns?
I enclose a first version of a function I just wrote. This will read a number of columns from a large Excel file. Since it ope...

environ 10 ans il y a | 1

| A accepté

A résolu


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

environ 10 ans il y a

Réponse apportée
How to seperate fractional and decimal part in a real number
mod(number,1)

environ 10 ans il y a | 0

Réponse apportée
What kind of solver should I use for a non-continuous function?
Note that the function that you give to ode45 returns the velocity and acceleration. When you change the sign of v in this func...

environ 10 ans il y a | 0

| A accepté

Réponse apportée
Consider a loop of string with unit length. Take n cuts independently and randomly along the string, what is the expected length of the smallest and the largest piece?
Your question is not very clear. The code below is an answer to: How can I code a test of this result? N=100000; % Number ...

environ 10 ans il y a | 1

A résolu


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

environ 10 ans il y a

A résolu


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

environ 10 ans il y a

Réponse apportée
solve a system of ODE
function [t,x]=euleroesplicito(fcn,t0,x0,h,tend) n = fix((tend-t0)/h)+1; t = linspace(t0,t0+(n-1)*h,n); x = ze...

environ 10 ans il y a | 1

| A accepté

A résolu


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

environ 10 ans il y a

A résolu


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

environ 10 ans il y a

A résolu


Given two strings, find the maximum overlap
Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

environ 10 ans il y a

A résolu


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

environ 10 ans il y a

A résolu


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

environ 10 ans il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

environ 10 ans il y a

A résolu


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

environ 10 ans il y a

A résolu


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

environ 10 ans il y a

A résolu


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

environ 10 ans il y a

A résolu


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

environ 10 ans il y a

A résolu


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

environ 10 ans il y a

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

environ 10 ans il y a

Réponse apportée
how to speedup the function datetime('('1/1/2014 1:00:00 AM','ConvertFrom','excel')?
[num,txt,raw] = xlsread('file.xlsx') returns date-time values as NaNs in the num output and as strings in the txt and raw ou...

environ 10 ans il y a | 0

Charger plus