Solved


cube of number
find cube of number

6 years ago

Solved


Change on Spiral Matrix
n>=3, generate a matrix of nth such that n^2 is the max number, and max number must be in [1,1] or [end, end]. One example will ...

6 years ago

Solved


Use R2016b Text Manipulations to Fix These Addresses (Part 3)
We have a series of addresses like the following which we'd like to reformat. Each of the addresses lacks a space and a comma ...

6 years ago

Solved


Use R2016b Text Manipulations to Fix These Addresses (Part 1)
We have a series of addresses like the following which we'd like to reformat. Can you remove the latitude and longitude from the...

6 years ago

Solved


Use R2016b Text Manipulations to Fix These Addresses (Part 2)
We have a series of addresses like the following which we'd like to reformat. All the addresses are in the Boston area of Mass...

6 years ago

Answered
How to load numbers in my array through a while true loop ?
Not sure what you want to do. I guessed. K = 26 w = linspace ( 0 , pi , 10*K ); while true a = input('Do you want to add...

6 years ago | 0

| accepted

Answered
How to vectorize this for loop with if statement
P = zeros(100,200) P(1,:)=10; P(:,1)=10; P(2:end,2:end)=M(2:end,2:end)-M(2:end,1:end-1);

6 years ago | 1

Answered
Find regular numbers 2^i 3^j 5^k
Cannot go higher without symbolics. [a,b,c]=meshgrid(0:63,0:40,0:27); r=2.^a.*3.^b.*5.^c; r=unique(r(:)); r=uint64(r(r<2^64)...

6 years ago | 1

Answered
how, using a for loop, can I create an array
No loop needed. a=.25:.25:4; b=a+2; V=(.25*pi^2).*(a+b).*(b-a).^2; A=pi^2*(b.^2-a.^2); plot(V,A);

6 years ago | 0

Answered
solving an equation with a condition
I ran this I could not find any cases where all real root parts are negative. z=-1e6; while sum(sign(real(roots([1 0 z z 50]))...

6 years ago | 0

Answered
Error : Index exceeds the number of array elements (1).
Seems like some of your equations are wrong. I changed a few things so the code does not error. Array lengths need to match in e...

6 years ago | 0

| accepted

Answered
Deleting rows from array
a(a(:,3)>5,:)=[];

6 years ago | 0

| accepted

Answered
What does [3, Inf] represents?
That is an array/vector with two elements 3 and Inf named sizeA. Workspace would show size as 1x2.

6 years ago | 0

Answered
Integrating several text files
Just read them in and concatenate. b=[]; for n=1:numberoffiles fileName=sprintf('yourfile%d',n);%assuming file names are ...

6 years ago | 1

Answered
How to plot two columns of a repeated value column from the same matrix?
sz=25; scatter(A(:,4),A(:,3),sz,A(:,1),'filled');

6 years ago | 0

| accepted

Answered
How to do an iterative problem involving two unknowns and an integral
%find integral, then V y=.005:.00001:.05; for k=1:length(y) I(k)=integral(@(x)(10*x-30)./(1.5-15*x),0,y(k)); V(k)=(I...

6 years ago | 0

Answered
How to average over different length vectors without excessive for loops?
I would use a cell array. for k=1:100 x{k}=randi(100,1,randi(1000));%simulate your outputs end Mean=zeros(1,100); for k...

6 years ago | 0

Solved


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

6 years ago

Solved


Variance computation (★★★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

6 years ago

Solved


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

6 years ago

Solved


Wrap-around effect
In vector x of length n we define (n+1) position as going back to the first position (so called wrap-around effect). Can you ret...

6 years ago

Solved


Explode string
Break a sentence into cell of words

6 years ago

Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0....

6 years ago

Solved


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

6 years ago

Solved


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

6 years ago

Solved


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

6 years ago

Solved


Remove the middle element from a vector
Remove the middle element of a vector? *Example:* [1,2,3] should return 2 [1,2,3,4] should return 2 [] should return...

6 years ago

Load more