답변 있음
How can I use the 'opposite' of findpeaks input argument?
Hello, It seems there is no "built-in" way to do this. But you could follow the simple example <https://it.mathworks.com/matla...

거의 7년 전 | 0

| 수락됨

답변 있음
How to vectorize for-loop for anonymous function that takes in row vectors as inputs, and spits out a single number as output.
Hi, I think that you need just to slightly modify your function func. Let's say it accepts only ROW vectors like a=[1...

거의 7년 전 | 1

| 수락됨

답변 있음
How can I recreate this wave using the sawtooth wave function?
Hi! You just need to slightly modify the function sawtooth, putting a minus sign before it and adding a division by a factor 2 ...

거의 7년 전 | 0

답변 있음
Why are fft diagrams mirrored?
Hi Dhyan, actually, it is not always the case, since it is true only for real signals. It can be proven mathematically that wh...

거의 7년 전 | 4

| 수락됨

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

대략 7년 전

문제를 풀었습니다


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

답변 있음
Circular moving point at a set velocity
Assuming that your velocities are already angular velocities (number of radians per time unit), adding a for loop and a vector t...

대략 7년 전 | 2

| 수락됨

문제를 풀었습니다


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

대략 7년 전

답변 있음
How do I reset the signal output?
I think that the answer you are searching is the "modulo" operation. Let's say your ramp is stored in vector y and you want the ...

대략 7년 전 | 0

답변 있음
for loop or str2num incorrectly adding 48 to results?
It is doing that because every character of the string '10', is memorized in matlab with an encoding. So '0' is actually stored ...

대략 7년 전 | 1

| 수락됨

답변 있음
How do you sum a vector and concatenate the outputs into the original array or vector.
I think this is the solution: S=sum(ArrayZ,1) %%outputs the sum of the colm ArrayZ=[ArrayZ; S]; %% append the sums ...

대략 7년 전 | 0

답변 있음
Error using griddedInterpolant The grid vectors do not define a grid of points that match the given values
Hi! The error comes in the second iteration of the for loop. In fact when you call Strain_c1Theta=interp1(T,Strain_c1Thet...

대략 7년 전 | 1

| 수락됨

답변 있음
Trying to use ezplot but i can't seem to get it. Whats wrong with my code?
If I understood correctly what you are trying to do, V11 is no more dependent on any of the initial symbols Vs, d and t. So, if...

대략 7년 전 | 0

| 수락됨

문제를 풀었습니다


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

7년 초과 전