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

alrededor de 9 años hace | 0

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

alrededor de 9 años hace | 1

| aceptada

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

alrededor de 9 años hace | 0

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

más de 9 años hace | 0

Respondida
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';... ...

más de 9 años hace | 0

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

casi 10 años hace | 2

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

casi 10 años hace | 0

Resuelto


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

casi 10 años hace

Enviada


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

alrededor de 10 años hace | 1 descarga |

5.0 / 5

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

alrededor de 10 años hace | 1

| aceptada

Resuelto


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

alrededor de 10 años hace

Respondida
How to seperate fractional and decimal part in a real number
mod(number,1)

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 0

| aceptada

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

alrededor de 10 años hace | 1

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

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

alrededor de 10 años hace | 1

| aceptada

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

Resuelto


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

alrededor de 10 años hace

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

alrededor de 10 años hace | 0

Cargar más