Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

meer dan 5 jaar ago

Solved


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

meer dan 5 jaar ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

meer dan 5 jaar ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

meer dan 5 jaar ago

Solved


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

meer dan 5 jaar ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

meer dan 5 jaar ago

Solved


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

meer dan 5 jaar ago

Answered
Plotting a signal between 8 and 15 sec
What is the problem exactly? You have your signal u 3001x1, with a sampling time of 10ms. It means that u(1) is the value of...

meer dan 5 jaar ago | 0

Answered
Binary to decimal - 8 bits at a time
You can try something like this using _bin2dec_ : for i=1:8:numel(binary) decimal=bin2dec(num2str(binary(i:i+7))) ...

meer dan 5 jaar ago | 2

| accepted

Answered
Compare two folders and write the matching files to the third folder
Have a look at the functions _dir_ and _exist_.

meer dan 5 jaar ago | 0

Answered
I have this error, and I don't know how to solve it.Can someone help me please?
The problem is that _Tx_signal_ is not a vector but a matrix of size 1000 x 1000. From the help of _conv_ function: _C = c...

meer dan 5 jaar ago | 0

| accepted

Answered
How to design LQR problem for tracking a reference output
You can use the <https://mathworks.com/help/control/ref/lqi.html lqi> function.

meer dan 5 jaar ago | 1

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

meer dan 5 jaar ago

Answered
Retrieve data from uitable when user enters data
You should handle the deletion of the table properly as explained here: <https://mathworks.com/matlabcentral/answers/95210-ho...

meer dan 5 jaar ago | 1

| accepted

Answered
How to create sine wave from given square wave
You just have to find the frequency of your square wave, and then create a sin wave like in those examples: <https://fr.mathw...

meer dan 5 jaar ago | 0

| accepted

Answered
rounding a column vector
Try this: temp=[273.9 274.1 274.5]; round(temp*2)/2 ans = 274.0000 274.0000 274.5000

meer dan 5 jaar ago | 0

Answered
Decoding/reading this file
You can use textscan to load the text file.

meer dan 5 jaar ago | 0

Answered
How could I translate this Python code to Matlab?
If you want to use your Python code into matlab, you can use: <https://mathworks.com/help/matlab/call-python-libraries.html> ...

meer dan 5 jaar ago | 0

| accepted

Answered
vector equals to value in matrix
The three following expressions: any(eq(A,gg)) any(A==gg) any(eq(0.9997,gg)) are the same and equal to 1. What is your...

bijna 6 jaar ago | 0

Answered
How to make a 3D bar graph for non-continuous data?
_I'm trying to make a 3D bar graph using the function bar3_ And it is not giving the desired result? What is wrong with: ...

bijna 6 jaar ago | 0

Answered
Solving large algebraic riccati-like problem
Why don't you use the matlab function for Riccati equation? See <https://fr.mathworks.com/help/control/ref/care.html>

bijna 6 jaar ago | 0

Answered
how to obtain the parameters of the step response within matlab?
Look at the <https://mathworks.com/help/control/ref/stepinfo.html stepinfo> command.

bijna 6 jaar ago | 0

Answered
How do I call a function from the MATLAB Editor into AppDesigner
I don't know exactly what you mean by "without changing the internals of the functions", but in the _CodeView_ of AppDesigner, y...

bijna 6 jaar ago | 0

Answered
Summing elements of an array
You can use either sum(cell2mat(P)) or sum([P{:}])

ongeveer 6 jaar ago | 0

Answered
How to use latex's \mathcal{Z} in the axis labels of a Matlab figure?
title('$\mathcal{Z}$','Interpreter','latex')

ongeveer 6 jaar ago | 2

Answered
How to create 4 axis on one single plot?
Maybe this <https://fr.mathworks.com/help/matlab/creating_plots/graph-with-multiple-x-axes-and-y-axes.html solution> is what you...

ongeveer 6 jaar ago | 0

Answered
Reshape and rearrange elements of a matrix
For your example, you could use something like this: A=[1 2 3 4 5 6; 7 8 9 10 11 12]; B=[reshape(A(:,1:end/2),2,3);reshap...

ongeveer 6 jaar ago | 0

Answered
How to take first character of Alphabet
One way to do it : regexpi(data,'[a-u]','match','once') ans = 7×1 cell array {'A'} {'A'} {'A'} ...

ongeveer 6 jaar ago | 0

Answered
help me loop i cant understand it
Try this to see if it is gets clear to you: for q1 = [1 2 -1;3 0 2] for q2 = [2 1] a = q2*q1; fpri...

ongeveer 6 jaar ago | 0

Answered
Combine three different set bar graphs in one graph
You can group your 3 bar graphs using something like this: b=bar([leak_22;leak_32;leak_45]); For your example, you will...

ongeveer 6 jaar ago | 0

Load more