Solved


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

4 years ago

Solved


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

4 years ago

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

4 years ago | 1

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

4 years ago | 0

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

4 years ago | 0

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

4 years ago | 0

| accepted

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

4 years ago | 0

| accepted

Solved


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

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

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

4 years ago | 1

| accepted

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

4 years ago | 0

Solved


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

4 years ago

Solved


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

4 years ago

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

4 years ago | 0

| accepted

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

4 years ago | 0

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

4 years ago | 1

| accepted

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

4 years ago | 0

| accepted

Solved


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

4 years ago

Solved


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

4 years ago

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

4 years ago | 1

| accepted

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

4 years ago | 1

| accepted

Answered
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)

4 years ago | 1

| accepted

Answered
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))

4 years ago | 0

| accepted

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

4 years ago | 1

| accepted

Answered
How do I make an entire row in a table NaN?
T(isOff,:) = {NaN};%does this work?

4 years ago | 1

| accepted

Answered
Need Help for the rest of this coding
function [ABrow, BAcol, FirstHalfA_LastHalfB] = vectorFun(A, B) ABrow = [A,B']; BAcol = flip(ABrow)'; FirstHalfA_LastHalfB = ...

4 years ago | 2

| accepted

Load more