Solved

Return fibonacci sequence do not use loop and condition

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

4 mesi ago

Solved

Is X a Fibonacci Matrix?

In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

4 mesi ago

Solved

Return the Fibonacci Sequence

Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

4 mesi ago

Solved

N-Dimensional Array Slice

Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

4 mesi ago

Solved

Permute diagonal and antidiagonal

Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

4 mesi ago

Solved

Removing rows from a matrix is easy - but what about inserting rows?

Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

4 mesi ago

Solved

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

4 mesi ago

Solved

Find the next Fibonacci number

In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

4 mesi ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

4 mesi ago

Solved

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

4 mesi ago

Solved

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

4 mesi ago

Solved

Weighted average

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

4 mesi ago

Solved

Read a column of numbers and interpolate missing data

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

4 mesi ago

Solved

Project Euler: Problem 2, Sum of even Fibonacci

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

4 mesi ago

Solved

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

4 mesi ago

Solved

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

4 mesi ago

Answered

Add date stamp to time stamp

Hi, these commands will resolve your task: load BB EEE=datenum(HRV_BB3.Time); DATES = datestr(EEE, 'mm/dd/yy'); You'd n...

Add date stamp to time stamp

Hi, these commands will resolve your task: load BB EEE=datenum(HRV_BB3.Time); DATES = datestr(EEE, 'mm/dd/yy'); You'd n...

4 mesi ago | 0

Answered

Function of vector with letter grade

Hi, function GRADE = fun_degree(inp) if inp >=90 GRADE='A'; fprintf('Your score is %d and Your earned grade is A \n', i...

Function of vector with letter grade

Hi, function GRADE = fun_degree(inp) if inp >=90 GRADE='A'; fprintf('Your score is %d and Your earned grade is A \n', i...

4 mesi ago | 1

Answered

How do you graph two equations on the same graph?

Hi, x = 0:.1:10; I = (-1/5000)*x+(.0018); plot(x,I), hold on %plot 2 q=1.6022e-19; C=28.73 ; T=273+C; ...

How do you graph two equations on the same graph?

Hi, x = 0:.1:10; I = (-1/5000)*x+(.0018); plot(x,I), hold on %plot 2 q=1.6022e-19; C=28.73 ; T=273+C; ...

4 mesi ago | 0

Answered

Problem with using while

while .. end is not used correcly, use for ... end instead for i = 1:numImages % Read Image I = readimage(imds,...

Problem with using while

while .. end is not used correcly, use for ... end instead for i = 1:numImages % Read Image I = readimage(imds,...

4 mesi ago | 0

Answered

Fixing figure size to match fontsize

hi, Maybe this one can help you to solve your task: set(gcf, 'paperpositionmode', 'auto'); print(gcf, '-djpeg', '-r600', 'M...

Fixing figure size to match fontsize

hi, Maybe this one can help you to solve your task: set(gcf, 'paperpositionmode', 'auto'); print(gcf, '-djpeg', '-r600', 'M...

4 mesi ago | 0

Answered

Change MATLAB character set encoding

Hi, Maybe this one helps with your problem: feature('DefaultCharacterSet','UTF-8'); Good luck

Change MATLAB character set encoding

Hi, Maybe this one helps with your problem: feature('DefaultCharacterSet','UTF-8'); Good luck

4 mesi ago | 0

Answered

plot a smith chart

Hi, Here is a useful help: https://www.mathworks.com/discovery/s-parameter.html Good luck.

plot a smith chart

Hi, Here is a useful help: https://www.mathworks.com/discovery/s-parameter.html Good luck.

4 mesi ago | 0

Answered

how to solve a linear equation

Hi, Here is the solution: syms P0 P1 P2 P3 % stable state syms u03 lamda13 lamda20 lamda21 u32 T= [1-...

how to solve a linear equation

Hi, Here is the solution: syms P0 P1 P2 P3 % stable state syms u03 lamda13 lamda20 lamda21 u32 T= [1-...

4 mesi ago | 0

| accepted

Answered

How to make a parabolic interpolation?

Hi, An exact custom equation as asked in the question can be attained on step 5 Fit Model Type selection via Custom Equation ...

How to make a parabolic interpolation?

Hi, An exact custom equation as asked in the question can be attained on step 5 Fit Model Type selection via Custom Equation ...

4 mesi ago | 0

Answered

Loop for comparing and plotting data

Hi Here is the corrected solution: load DayGroups.mat load DayGroups_t.mat for k = 1:size(DayGroups,1) for j = 1:s...

Loop for comparing and plotting data

Hi Here is the corrected solution: load DayGroups.mat load DayGroups_t.mat for k = 1:size(DayGroups,1) for j = 1:s...

4 mesi ago | 0

| accepted

Answered

How to make a parabolic interpolation?

Hi, An easy solution is to employ the toolbox: cftool of MATLAB. Launch it: >> cftool Select X data: X Select Y data: Y S...

How to make a parabolic interpolation?

Hi, An easy solution is to employ the toolbox: cftool of MATLAB. Launch it: >> cftool Select X data: X Select Y data: Y S...

4 mesi ago | 0

Answered

Matlab Vehicle / Car Tracking / Kalman Filter / Noise Reducing

Hi, In your problem, you may employ the moving average filter: movavg() to reduce the influence of the noises. Good luck.

Matlab Vehicle / Car Tracking / Kalman Filter / Noise Reducing

Hi, In your problem, you may employ the moving average filter: movavg() to reduce the influence of the noises. Good luck.

4 mesi ago | 0

Answered

Using same figure properties (e.g. current axes) onto new ones

hi, An easy way is to create/generate (MATLAB automatically) a plot building file from your already created plot figure via F...

Using same figure properties (e.g. current axes) onto new ones

hi, An easy way is to create/generate (MATLAB automatically) a plot building file from your already created plot figure via F...

4 mesi ago | 1

| accepted

Answered

timerange in a loop

How about this way: for ii=2012:2016 H{ii-2011,1} = [num2str(ii), '-01-01']; H{ii-2011, 2}= [num2str(ii), '-02-01'...

timerange in a loop

How about this way: for ii=2012:2016 H{ii-2011,1} = [num2str(ii), '-01-01']; H{ii-2011, 2}= [num2str(ii), '-02-01'...

4 mesi ago | 1