已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已解决


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

7 years 前

已回答
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...

7 years 前 | 0

已回答
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...

7 years 前 | 0

已回答
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...

7 years 前 | 0

已回答
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...

7 years 前 | 0

已回答
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...

7 years 前 | 0

已回答
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...

7 years 前 | 0

| 已接受

已回答
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...

7 years 前 | 0

| 已接受

已回答
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 ...

7 years 前 | 0

已回答
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; ...

7 years 前 | 2

| 已接受

已回答
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+...

7 years 前 | 1

已回答
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

7 years 前 | 0

| 已接受

已回答
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

7 years 前 | 0

已回答
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>

7 years 前 | 0

已回答
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...

7 years 前 | 0

| 已接受

已回答
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-...

7 years 前 | 0

| 已接受

已回答
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; ...

7 years 前 | 0

| 已接受

已回答
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...

7 years 前 | 0

加载更多