Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

Gelöst


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

etwa 6 Jahre vor

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

etwa 6 Jahre vor | 0

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

etwa 6 Jahre vor | 2

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 1

Gelöst


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

mehr als 6 Jahre vor

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

mehr als 6 Jahre vor | 1

| akzeptiert

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

| akzeptiert

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 2

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

Beantwortet
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'} ...

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

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

mehr als 6 Jahre vor | 0

Mehr laden