Solved


S-T-R-E-T-C-H I-T O-U-T
You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of...

5 years ago

Solved


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

5 years ago

Solved


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

5 years ago

Solved


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

5 years ago

Solved


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

5 years ago

Answered
tf or "transfer function" will not work on my fresh install of matlab
One of the common errs happen with many users is that accidentally without intention you may have called a variable or m-file or...

5 years ago | 0

Answered
Compound interest in a for loop
v=p; for N=2:length(n) y(N)=(v(N-1)*(1+r).^N+c) v(N)=v(N-1)+y(N); % specify the index and you will get all the value...

5 years ago | 0

Answered
how to take mean of matrices stored in .xlsx format?
Start with data import: readtable() or xlsread() Compute the averages using mean() or mean2() whether you want to compute the...

5 years ago | 0

Answered
What should be dimension of surf(X,Y,Z) 3D?
There are a few errs and missing points in your code. Here is the corrected complete code. clearvars; format long g; load('d...

5 years ago | 0

Answered
How to retrieve data points from a grayscale histogram?
(1) Import// read your image in matlab (2) perform histogram analysis with hostogram(), e.g: h= histogram() or h = histogram2()...

5 years ago | 0

Answered
how can i find R2 (Rsquared) for regression problem in matlab?
R-squared can be computed easily from your derived fit model vs. your original data. Moreover, R-square can be computed in Stati...

5 years ago | 0

Answered
Heun's method stiff ODE
There are a few crucial errs in your code. Here is the completely corrected code. Note that the step size of h1 = 1 gives very c...

5 years ago | 1

Answered
exact solution for system first order ODEs
You shall try dsolve() if your system of ODEs can be solved analytically via Symbolic MATH. https://www.mathworks.com/help/symb...

5 years ago | 1

Answered
problem with f surf
THere are a few errs in your code - loop calculations and redefining 'f3'. Here is the corrected code: ... series=0; for k=...

5 years ago | 0

| accepted

Answered
Autocorrelation with big data
One typo that caused the error: plot(lags/fs, autocor); % autocor is the variable name NOT autocorr

5 years ago | 0

| accepted

Answered
intensity of dought events
Use can use mean()

5 years ago | 0

Solved


Weave two matrices together to form one matrix
Take the first column from matrix a, then insert the first column from matrix b, and so on. For example: a = [1 2 3 4]; b ...

5 years ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

5 years ago

Answered
How to plot different lengths of vectors?
Check your constants, R, deltaHrxn1, deltaHrxn2,... Note that the solutions might have two components, real and imaginary parts...

5 years ago | 0

Solved


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

5 years ago

Solved


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

5 years ago

Solved


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

5 years ago

Answered
Is there a better way to solve this multidimensional array?
Use mean2() intead of mean() that will help you to get rid of all loops.

5 years ago | 0

Answered
How to insert data with fopen ?
THis is how you can export data from MATLAB into an external file: FID =fopen('MYData.dat', 'w'); STR =':Frame 1 ...

5 years ago | 0

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

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

5 years ago

Solved


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

5 years ago

Solved


02 - Vector Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of ...

5 years ago

Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

5 years ago

Solved


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

5 years ago

Load more