Resuelto


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

más de 5 años hace

Resuelto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

más de 5 años hace

Resuelto


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

más de 5 años hace

Resuelto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

más de 5 años hace

Resuelto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

más de 5 años hace

Resuelto


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

más de 5 años hace

Resuelto


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

más de 5 años hace

Resuelto


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


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

más de 5 años hace

Resuelto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

más de 5 años hace

Resuelto


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

más de 5 años hace

Respondida
How can I build simulation target in r2017b?
Simulink builds a target model by default for more information you can check this.

más de 5 años hace | 0

Respondida
Using textscan with lines of different length
You can get the line as an input using the function fgetl, it will take all the values in a line regardless of the datatypes and...

más de 5 años hace | 0

| aceptada

Respondida
Reading multiple NetCDF files in a Loop with multiple variables
If you want to overwrite graphs of other months over this one you can use hold on. If you want to divide the figure in differen...

más de 5 años hace | 0

Respondida
Selecting a specific answer
You can use the function any to find out if any of the variables is equal to any other variable. any(a==[b c d]) will gave a ...

más de 5 años hace | 0

Respondida
s function builder source generation location
Hey Joshua, You can cd to another directory and then use the s function builder so all the files are created there and then cop...

más de 5 años hace | 0

Respondida
Extracting matrix and making 2D plot
You can change the limits by replacing latlim=[min(latmat(:)) max(latmat(:))] lonlim=[min(lonmat(:)) max(lonmat(:))] by lon...

más de 5 años hace | 0

| aceptada

Respondida
Index exceeds the number of array elements (1).
In the code above 'b' and 'c' are scalars and cannot be indexed. If you want to get an array of 'b' and 'c' as 'u' is increasing...

más de 5 años hace | 0

Respondida
Is it possible to promote in one go the mask of a subsystem to the mask of the subsystem that encapsulates it?
You can copy the mask from one block to another using this. You can use the same for subsystems.

más de 5 años hace | 0

Respondida
How do I change the amount of noise I want to add to a signal?
One method to do it is: >> noise = randi([-10,10]*10^n,[20,1])/10^n >> for i=1:size(noise) >> if noise(i)>9 >> b(i)...

más de 5 años hace | 0

Respondida
codegeneration array out of bounds check
Hey Bernhard, Simulink does not support checking out of bound array possibility during code generation. You can run Simulnk De...

más de 5 años hace | 0

| aceptada

Respondida
Creating table of toggle buttons
Hey Luis, A single function can be used for callback of all the toggle buttons. The button which was pressed can be recognize...

más de 5 años hace | 0

Respondida
Adding a marker to Data Marker to Heatmap (via imagesc)
Hey Jason, The second subplot command is creating another plot over the top of your original plot. Just remove the second subpl...

más de 5 años hace | 0

Respondida
Using parametric equations in terms of theta1 and theta2 to plot a point A for a range of angles
Hey Raphael, Since Matlab does direct calculations of Vectors you dont need a for loop for this problem. theta1=20:0.5:80; th...

más de 5 años hace | 1

Respondida
How do i implement moving average for prediction?
Hey Ali, It seems like in the Excel sheet the moving mean of ‘Actual’ is printed in ‘Forecast’. In Matlab ‘Forecast’ is used a...

más de 5 años hace | 0

| aceptada

Cargar más