Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

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

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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Risolto


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

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

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

quasi 11 anni fa

Risolto


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

quasi 11 anni fa

Risolto


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

quasi 11 anni fa

Risolto


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

quasi 11 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. Example...

quasi 11 anni fa

Risolto


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

quasi 11 anni fa

Domanda


bug in zoom in timeseries plot
before i report a bug i want to ask if someone have a problem with the zoom button on a timeseries plot. i create a time-seri...

circa 11 anni fa | 0 risposte | 0

0

risposte

Risposto
How Can I Assign variable Name?
you can use <http://www.mathworks.com/help/matlab/ref/eval.html eval> function.but it not recommended. and you cannot use / in ...

circa 11 anni fa | 0

Risposto
create new matrix with special structure
The simple way: for j=0:2:m-1 for i=1:n newmatrix(1+j,2*i-1:2*i)=p(j+[1 2],1); end end

circa 11 anni fa | 0

Risposto
Concatenate two cells into another
do you try to use <https://www.mathworks.com/help/matlab/ref/strcat.html strcat>? It allow you to concatenate two cells. ...

circa 11 anni fa | 0

| accettato

Risposto
i dont know why my code is not working..
plot(f,Pyy(1:2^(N-1))); the length of pyy in 14 so you cannot take cell number 16384 (2^13). another problem: length(f)=81...

circa 11 anni fa | 0

Risposto
Save figures in a subfolder after 2 for loops?
use <http://www.mathworks.com/help/matlab/ref/mkdir.html mkdir> to create a folder and change the folder name you save on to the...

circa 11 anni fa | 0

| accettato

Domanda


using xlsread for cell variable
I have a data store in .csv files. in the data i have vector of number that i want get in cell not in string (and some more data...

circa 11 anni fa | 2 risposte | 0

2

risposte

Domanda


save an excel file to be read only
can we save data on excel file (by xlswrite function or other way) and define the file to be read-only from matlab?

circa 11 anni fa | 2 risposte | 0

2

risposte

Domanda


find n-st element that meet a logical expression
I have 2 question: 1) find function can give the all n-th element (first or last) that meet a logical expression. i want only t...

circa 11 anni fa | 1 risposta | 0

1

risposta

Risposto
Function to aggregate data
first you don't need to put them together, you just need to track the line you want and take them from the second matrix (for ex...

circa 11 anni fa | 0

Domanda


dynamic y-tick label
It have a way to save the y-tick to be dynamic and decide what will be the label format. In default is show 5 number, i want to...

circa 11 anni fa | 1 risposta | 0

1

risposta

Domanda


save size of Matlab environment variable
Hi, I have some question about the presentation of variable in Variables window. 1) I have a matrix with 18 Column. when ...

circa 11 anni fa | 1 risposta | 0

1

risposta

Domanda


It is possible to find all m-file i call to another m-file?
my problem is that i create a function and call it in several programs (m-files), now i find a better way and change the functio...

circa 11 anni fa | 1 risposta | 0

1

risposta

Risposto
Problem in using the "While" loop function
you need to define all variables. n(1)=n0; while 1 if n(end) <=0 break; end n(end+1)=n(end)-S*exp(...

oltre 11 anni fa | 0

| accettato

Risposto
plotting using data from a cell array
you can use <http://www.mathworks.com/help/matlab/ref/bar.html bar> and specify xlabel name. figure name = {'m1';'m2';'m...

oltre 11 anni fa | 0

Carica altro