Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 2

| accepted

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

ongeveer 8 jaar ago | 1

Answered
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

ongeveer 8 jaar ago | 0

| accepted

Answered
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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

Load more