Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

Risolto


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

circa 7 anni fa

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

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

circa 7 anni fa | 2

| accettato

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

circa 7 anni fa | 1

Risposto
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

circa 7 anni fa | 0

| accettato

Risposto
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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

| accettato

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

circa 7 anni fa | 0

Carica altro