Solved


2) Are you more familiar with iteration methods or Linear Algebra ? Let's see together.
Referring to problem: https://www.mathworks.com/matlabcentral/cody/problems/44530-are-you-more-familiar-with-iteration-method...

4 years ago

Solved


Are you more familiar with iteration methods or Linear Algebra? Let's see together.
Given a sum result *_x_* value of a *_N_* number of addends, build an array of _*N*_ elements _*y*_ such that the following equa...

4 years ago

Answered
Shift elements of matrix N times (MATLAB)
a=circshift(eye(m-1),m-2,2);

4 years ago | 0

| accepted

Answered
cell vector array division
Lots of assumptions below, but you should be able to adopt the below code for what you want to do. [r,c]=size(A); for R=1:r ...

4 years ago | 2

| accepted

Answered
Store each value generated in a for loop
for k=1:100 p(k)=%your update for p end plot(p);

4 years ago | 0

Answered
Combining two datetime columns into one
d=[Obs_data.Date,' ',Obs_data.Time]; datetime(d,'InputFormat','MM/dd/yyyy HH:mm');

4 years ago | 0

Answered
How to extract values from an array?
a=num2str(yourArray==30); a=a(a~=' '); [s,f]=regexp(a,'[1]*'); new_array=[s,f];

4 years ago | 0

Solved


find location of indexes
Given a vector with integer values. Find the edge location of the stream of same value. For example: A=[0 0 0 1 1 1 1 2 2 ...

4 years ago

Solved


Find parts of a circle.
Given radius (r) of a circle find the diameter (d), circumference (c), an area (a).

4 years ago

Solved


Determining if a Degree Sequence is Potentially a Graph
A degree sequence is a list of numbers representing the degrees of vertices in a graph. While it is difficult to tell if a graph...

4 years ago

Solved


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

4 years ago

Solved


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

4 years ago

Solved


No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros: input = [zeros(5...

4 years ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

4 years ago

Answered
Function to be used for calculating number of points(randomly generated) inside the rectangular area
I assume something like this: (other dimension does not matter) r=1000*rand(1,100000);%generate 100000 rand numbers between 0 a...

4 years ago | 0

Solved


Dial Up
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list: 2 ABC, 3 DEF...

4 years ago

Solved


generate capital english alphabets
Based on the numeric input 'n', generate the capital english alphabet starting from A till the english alphabet at the 'n'th pos...

4 years ago

Solved


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

4 years ago

Solved


Move if I am Optimus Prime
If the number is a prime, roll out!

4 years ago

Solved


Clipper Function
Create a function that emulates a clipper circuit Given sin wave, t and the constant value for clipping, and the direction to re...

4 years ago

Solved


Create cosine function out of sine
Please dont use cos(x) directly

4 years ago

Solved


Clamper Function
Create a function that emulates a clamper circuit Given sin wave, t and the constant value for clamping

4 years ago

Answered
I want to create a vector that contains the values of the derivative of a function f at the knot points?
Not really sure what you are asking. More information would be benefical to answer the question. knotPoints=-5:5;%whatever df=...

4 years ago | 0

Answered
How to concatenate binary strings?
A=A'; A=reshape(A,256,[]);%each column will now be your desired arrays, you could transpose again if you wanted rows being your...

4 years ago | 1

| accepted

Answered
Unable to find functional inverse of power function
There is an inverse for some theta's but most theta's will produce imaginary results for negative values of x. syms x f=x.^3;...

4 years ago | 0

| accepted

Answered
How can I plot cos(x)^n for n between 1 and 10 on the same plot.
[x,n]=meshgrid(0:.01:2*pi,1:10); f=cos(x).^n; plot(x(1,:),f);

4 years ago | 0

| accepted

Answered
How to Preallocate for speed?
s=size(membrane); deltaX=floor(s(2)/20);%should use floor or you will run into indexing problems below deltaY=floor(s(1)/20);%...

4 years ago | 0

| accepted

Answered
How to flip non-zero elements of an array and keep zero elements at initial position?
A = [1 2 3 4 5 0]; a=flip(A(A~=0)); a=[a,zeros(1,length(A)-length(a))];

4 years ago | 0

Answered
How can I insert the second column from a matrix into a bigger matrix?
loading=[2,0,-10000;3,-7500,0;4,0,-10000]; force=zeros(6,2); force(loading(:,1),:)=loading(:,2:3);

4 years ago | 1

| accepted

Solved


Create the Ulam spiral
Have you ever seen this wonderful spiral ? The Ulam Spiral is arranging prime numbers in a clockwise spiral starting in 0. Give...

4 years ago

Load more