Respondida
How to keep false as false, and not as zero
If you are just using false as a flag, change false into some other number flag. You could use a particular number that will nev...

más de 3 años hace | 1

| aceptada

Resuelto


Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers. 0 is to be treated inde...

más de 3 años hace

Resuelto


Find the dividend
Given a vector of pairwise coprime positive integers, p, and a vector of corresponding remainders, r, return a positive integer,...

más de 3 años hace

Resuelto


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

más de 3 años hace

Respondida
how to get the same result using rand
s=sum(rand(2,1e6)-.5); histogram(s,40)

más de 3 años hace | 1

Respondida
Grouping consectuve datapoints from a table into an array
Best to keep all the data together. Just reshape the array and index into it. pulse=reshape(yourTable.InstantPowerX,3,[])';%pul...

más de 3 años hace | 0

Respondida
Plotting a scaler and adding a legend to graph
Look at legend to add an appropriate legend. % in m/s v= 0:1:261; AirDen= 1.225; CdA=0.501; coefficient =0.006; g=9.81; m...

más de 3 años hace | 0

Respondida
How to dynamically name a large number of tall tables?
This should read all tables one at a time, combine the same categorical names, and store new tables as the categorical names. d...

más de 3 años hace | 0

| aceptada

Respondida
Efficient way to reshape data
data = [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...

más de 3 años hace | 0

| aceptada

Resuelto


Easy Sequences 79: Trailing Zeros of Fibonorial Numbers at any Base
The fibonorial of an integer is defined as follows: where: is the -th Fibonacci number ( and for ). I...

más de 3 años hace

Resuelto


Construct a "diagAdiag" matrix
Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...

más de 3 años hace

Resuelto


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

más de 3 años hace

Resuelto


Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...

más de 3 años hace

Resuelto


love is an n-letter word
Given a list of *N words*, return the *N-letter word* (choosing one letter from each word) with the property of having the least...

más de 3 años hace

Resuelto


Create a recurrence matrix for a vector of data
In <https://en.wikipedia.org/wiki/Conversation_analysis conversation analysis>, it's often useful to track the contributions fro...

más de 3 años hace

Respondida
Angle between two 3D vectors
I don't see anything wrong. I assume you are using a loop. st_direction =[0.6320;0.7308;0.2579]; A =[-0.8903 -0.6071 -0.7...

más de 3 años hace | 1

| aceptada

Respondida
How to solve a function with uknown parameter with bisection method
x=13.61015;y=13257; f=@(p)(x^3+p.^(2*x^2)-10)*sin(x)-y; p=fzero(f,1) P=1.01:.00001:1.03; plot(P,f(P))%plot shows zero crossi...

más de 3 años hace | 0

Resuelto


Convolution Power
Create the convolution-power vector from initial vector _x_ and power _n_. In other words, similar to the scalar case, raising ...

más de 3 años hace

Resuelto


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

más de 3 años hace

Respondida
Coding and ploting of a serie
t= 0:0.001:1; n=1:5; a=[0.05282 -0.00909 -0.02733 0.02509 -0.00268]; b=[-0.04866 -0.0104 0.002598 0.02111 -0.01372]; w=8.48...

más de 3 años hace | 0

| aceptada

Respondida
How I Code the limit integration??
f=@(x).5*exp(-.2*x).*sin(10*pi*x); I=integral(f,0,1)

más de 3 años hace | 0

Respondida
sums with for loop
n=1:502; s=sum((-1).^(n+1)./(2*n-1))

más de 3 años hace | 1

| aceptada

Respondida
Input or put a large array of numbers into a function
x='locate';prob=[.1 .18 .02 .4 .08 .22]; p=[];order=3; n=nchoosek(1:length(x),order); for k=1:size(n,1) p=[p;perms(n(k,:...

más de 3 años hace | 0

| aceptada

Resuelto


String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

más de 3 años hace

Resuelto


Find the outlier in a set of samples
Given an array x of numbers. Assumed that this array has one outlier. Find the position p and the value v of the outlier in this...

más de 3 años hace

Respondida
How to merge matrix in a loop?
A=randi(10,4,3) B=randi(10,5,3) C=randi(10,6,3) D=randi(10,7,3) N=2; newMatrix=generateMatrix(A,B,C,D,N) function ne...

más de 3 años hace | 1

| aceptada

Respondida
for loop through matrix index
Your sizes can be different, store in cell array. for i = 1:length(lc) S{i} = new_ch(max([lc-pre_stim,1]):min([lc+(post_st...

más de 3 años hace | 1

| aceptada

Respondida
How to do type II double integration on matlab
Use symbolic integration syms x y f=x^2; int(int(f,x,0,acos(y)),y,0,1) double(ans)

más de 3 años hace | 1

| aceptada

Respondida
if i have a function( [y]=ax+b, and i want to plot two lines that derive from the same function in the same graph. how to do so?
y=@(x)2*x+5; Y=@(x)x+7; x=-10:.1:10; plot(x,y(x),x,Y(x))

más de 3 años hace | 0

| aceptada

Respondida
Find the rate of change of data over specific increments of time
data = readtable('TSLA_STOCK.csv'); idx=find(diff(month(data.Date))); monthlyClose=data.Close(idx); ROV=diff(monthlyClose)./m...

más de 3 años hace | 1

| aceptada

Cargar más