A résolu


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

presque 7 ans il y a

A résolu


Free passes for everyone!
THIS PROBLEM IS TEMPORALLY DECOMMISSIONED WHILE IT IS UPDATED. PLEASE WAIT _Simply return the name of the coolest numerical c...

presque 7 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

presque 7 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

presque 7 ans il y a

A résolu


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

presque 7 ans il y a

A résolu


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

presque 7 ans il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

presque 7 ans il y a

A résolu


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

presque 7 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

presque 7 ans il y a

A résolu


sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45

presque 7 ans il y a

A résolu


Is my wife right?
Regardless of input, output the string 'yes'.

presque 7 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

presque 7 ans il y a

Réponse apportée
For loop question of Iteration
Hello, KACPER PAWLOWSKI. You can see the values in each iteration. After each iteration, you must press enter to continue to nex...

presque 7 ans il y a | 0

Réponse apportée
Plot Matrix Columns in a Loop
Hello, Jacqueline Kpognon. Do you want to differents figures? Try this: pos = find(y==1); neg = find(y==0); plo...

presque 7 ans il y a | 0

Réponse apportée
Question about initial movement of inverted pendulum
Maybe the force is not being applied in the gravity center. So a momentum will be generate, rotating the body. Some parts of th...

presque 7 ans il y a | 0

Réponse apportée
How to convert binary number to decimal integer?
Hello. Maybe this can be helpfull for you <https://www.mathworks.com/matlabcentral/answers/98649-how-can-i-convert-a-negat...

presque 7 ans il y a | 0

Réponse apportée
I am trying to plot a Gaussian normal probability density function with 500 points, mean=1.5 standard deviation 0.5. The Below is my code. My code doesn't have a error but the plot is not accurate.
Hello Sam. I used: Y = normpdf(x,m,s) and give the same result. Seems that is correct.

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Replacing Values of a Larger Matrix with that of a Smaller Matrix
imgSiz = [x1,y1]; blkSiz = [x1,size_column]; numRep = imgSiz./blkSiz; basMat = toeplitz(mod(0:numRep(1)-1,2),mod(0:nu...

presque 7 ans il y a | 0

Réponse apportée
How to Create Alternating Black Columns Across an Image?
Hello Richard! You can try this: size_of_column = 16; img = imread('image_exemple.jpg'); imshow(img); mask = ze...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to do a convolution for n samples starting from n=0 ?
Hello Jucimar. You can try this: x = [-1 0 1]; h = [0.5 0.25 0 0.125]; w = conv(x,h) w = Columns 1 through...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to plot a circle of some radius on a polar plot, when the circle is not centered in the origen?
Hello Gabriel Malagon Carvajal. You can try this: %k is a constant that you can difine as the circles size k = 0.4 %a ...

presque 7 ans il y a | 0

Réponse apportée
How to crop square of size 100 X 100 around the centroid of an image?
Change x_cent and y_cent for your centroids; change the name of images variables x_cent = 120; y_cent = 150; ...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
Approximating Pi using a series
PI=0; N=10; %qty of elements in the serie v=zeros(N+1,1); for n=0:N PI=PI+4*(((-1)^n)/(2*n+1)); v(n+...

presque 7 ans il y a | 1

Réponse apportée
How to create a vector from two or three point?
A = [1,2] B = [6,3] C = [1,5] AB = B - A AC = C - A The same with three points

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to change element in base 10 to base 2 in a matrix, with loops and while
A = magic(5) %generating a matrix 5x5 A = (A<10) %suppose you want the elements in A < 10

presque 7 ans il y a | 0

Réponse apportée
how do i approximate pi using queation of arctan(1)=4*arctan(1/5)-arctan(1/239) ?
This may be helpfull: <https://br.answers.yahoo.com/question/index?qid=20090809111721AA7YUFZ>

presque 7 ans il y a | 0

Réponse apportée
How to find the gradient of a curve at a specific point?
If the data is in the variable "data", you find the gradient like this: grad = zeros(size(data)) for i=1:(size(dat...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Matlab code to find hand extremeties and centre of a hand after image segmentation.
Hello Manjiree Waikar. Have you tried this:? <https://www.mathworks.com/matlabcentral/fileexchange/46573-roi-of-palmprint-...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
From a structure find the number of rows with a certain character
Hello Asim Ismail! Maybe this can be helpfull: I create a struct "s" with a field "type". clear all; close all; ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to add dates to a read loop
It appears you need to concatenate tables; see for example <https://www.mathworks.com/matlabcentral/answers/233921-how-to-ad...

presque 7 ans il y a | 0

Charger plus