Solved

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

30 jours ago

Answered

To extract the last sub string from strings

You can use extractBetween with index of last space character and the common denominator at the end of the string ('EP') load i...

To extract the last sub string from strings

You can use extractBetween with index of last space character and the common denominator at the end of the string ('EP') load i...

30 jours ago | 0

| accepted

Answered

How to solve an issue with an equation that has a variable with multiple values.

You are not getting wrong values of y. format long x = (1:10)'; y = (exp(3*x).*((2*x)+(log(40*x)))) Since there is a big di...

How to solve an issue with an equation that has a variable with multiple values.

You are not getting wrong values of y. format long x = (1:10)'; y = (exp(3*x).*((2*x)+(log(40*x)))) Since there is a big di...

environ un mois ago | 1

| accepted

Solved

Sum of Arithmetic Progression

Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

environ un mois ago

Solved

Leftovers? Again?!

I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

environ un mois ago

Solved

List the semiprimes

A semiprime number—or a 2-almost prime—is the product of two prime numbers. The numbers and are semiprimes, but and are not....

environ un mois ago

Solved

Magical Land

Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

environ un mois ago

Answered

How to show the variable name instead of its value in a plot's text, when using "syms", "text" and "latex" functions

syms y(a,x) y(a,x) = exp(-a*x); % equation to show inside the plot figure fplot(y(0.01,x), [0 500]) text(100,0.5, ['$y = ' l...

How to show the variable name instead of its value in a plot's text, when using "syms", "text" and "latex" functions

syms y(a,x) y(a,x) = exp(-a*x); % equation to show inside the plot figure fplot(y(0.01,x), [0 500]) text(100,0.5, ['$y = ' l...

environ un mois ago | 1

| accepted

Solved

Matrix of Multiplication Facts

This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

environ un mois ago

Solved

Factor Digits

Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

environ un mois ago

Solved

Text Processing - New

Derived from problem 2440. A string containing several sentences are given as input. If any sentence contains the word 'great...

environ un mois ago

Problem

Magical Land

Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

environ un mois ago | 0 | 5 solvers

Answered

How to use loop for plotting multiple plots and legend?

What you want to do is possible but quite more tedious than what you did. y=readtable('test file.xlsx'); z=cell(1,20); for i=...

How to use loop for plotting multiple plots and legend?

What you want to do is possible but quite more tedious than what you did. y=readtable('test file.xlsx'); z=cell(1,20); for i=...

environ un mois ago | 0

| accepted

Answered

I want to solve it with the unknown

You have defined your function handle as - f = @(t,y,s,r,Nddotmax) (r*((1-y)/Nddotmax)+s-0.0012*0.02*y); Which means it requir...

I want to solve it with the unknown

You have defined your function handle as - f = @(t,y,s,r,Nddotmax) (r*((1-y)/Nddotmax)+s-0.0012*0.02*y); Which means it requir...

environ un mois ago | 0

| accepted

Answered

How to find the value in one column based on a value of a another column.

%random data y=table((1:10)',randi(10,10,1),randi(12,10,1),randi(15,10,1),'VariableNames',{'Time','Pressure_A', 'Pressure_B', '...

How to find the value in one column based on a value of a another column.

%random data y=table((1:10)',randi(10,10,1),randi(12,10,1),randi(15,10,1),'VariableNames',{'Time','Pressure_A', 'Pressure_B', '...

environ un mois ago | 0

Answered

Sum: every nth column and groups/blocks of columns

%comment lines removed c=3; % no. of countries s=4; % no. of sectors X=magic(c*s); % 12 Vectorized solution S1=reshape(sum(...

Sum: every nth column and groups/blocks of columns

%comment lines removed c=3; % no. of countries s=4; % no. of sectors X=magic(c*s); % 12 Vectorized solution S1=reshape(sum(...

environ un mois ago | 0

Answered

index 1-0 sume set

Writing the answer based on Google translate text x=[0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1]; x=[~x(1) x ~x(end)]; c=0; %count n=...

index 1-0 sume set

Writing the answer based on Google translate text x=[0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1]; x=[~x(1) x ~x(end)]; c=0; %count n=...

environ un mois ago | 1

| accepted

Solved

Is this a valid Tic Tac Toe State?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

environ un mois ago

Solved

The Number of Ways

Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

environ un mois ago

Answered

How to fix the precession difference error of variables in matlab?

If you look at the values, you will get an idea as to why that's happening - format long T1=load('T1.mat').T1; T2=load('T2.ma...

How to fix the precession difference error of variables in matlab?

If you look at the values, you will get an idea as to why that's happening - format long T1=load('T1.mat').T1; T2=load('T2.ma...

environ un mois ago | 1

| accepted

Answered

I am receiving this error : Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts) is not supported.

a = readmatrix('a.xlsx'); b = readmatrix('b.xlsx'); c = readmatrix('c.xlsx'); %I have not suppressed the outcome so you can v...

I am receiving this error : Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts) is not supported.

a = readmatrix('a.xlsx'); b = readmatrix('b.xlsx'); c = readmatrix('c.xlsx'); %I have not suppressed the outcome so you can v...

environ un mois ago | 2

| accepted

Answered

Unsupported use of the '=' operator. To compare values for equality, use '=='. To specify name-value arguments, check that name is a valid identifier with no surrounding quote

There is a close bracket sign (']') missing in your code %2nd last line model_parameters = [a_sol, b_sol,c_sol, d_sol] ...

Unsupported use of the '=' operator. To compare values for equality, use '=='. To specify name-value arguments, check that name is a valid identifier with no surrounding quote

There is a close bracket sign (']') missing in your code %2nd last line model_parameters = [a_sol, b_sol,c_sol, d_sol] ...

environ un mois ago | 1

Solved

Return a list sorted by number of consecutive occurrences

Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE ...

environ un mois ago

Solved

Dick Van Dyck?

Not the celebrity, Dick Van Dyke, this problem relates to balanced strings of parentheses, Dyck Language. Please attach the de...

environ un mois ago

Solved

Compute the Bernoulli numbers

The <https://en.wikipedia.org/wiki/Bernoulli_number Bernoulli numbers> appear in several applications in number theory, includin...

environ un mois ago

Solved

Generalized sorting

Write generalized sort function |sortg()| that sorts array elements in “ascending” order with given comparison funct...

environ un mois ago

Solved

Get to a number faster.

If you start with $1 and, with each move, you can either double your money or add another $1, what is the smallest number of mov...

environ un mois ago

Solved

Vector slither sort!

Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

environ un mois ago