Solved


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

ongeveer 4 jaar ago

Solved


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.

ongeveer 4 jaar ago

Solved


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

ongeveer 4 jaar ago

Solved


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

ongeveer 4 jaar ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

ongeveer 4 jaar ago

Solved


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

ongeveer 4 jaar ago

Solved


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

ongeveer 4 jaar ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

ongeveer 4 jaar ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

ongeveer 4 jaar ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

ongeveer 4 jaar ago

Solved


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

ongeveer 4 jaar ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

ongeveer 4 jaar ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

ongeveer 4 jaar ago

Solved


Return area of square
Side of square=input=a Area=output=b

ongeveer 4 jaar ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

ongeveer 4 jaar ago

Solved


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

ongeveer 4 jaar ago

Solved


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

ongeveer 4 jaar ago

Answered
i need to convert data from hourly data to daily data and plot these data
Import using a timetable. https://www.mathworks.com/help/matlab/timetables.html Decide how you want to decimate the data in col...

ongeveer 4 jaar ago | 0

Answered
Passing parameters to dde23 slows it down
Anonymous functions carry some overhead. I wonder if the way it's parsing the arguments to dde23 is causing it to rebuild the an...

ongeveer 4 jaar ago | 0

Answered
Concatenate fields of a structure into a matrix
Long-term, it sounds like you might want to consider a different data structure, if that's an option. In the interim, try cell2...

ongeveer 4 jaar ago | 0

Answered
Error in Integrator is not finite. How can I fix it?
Since this happens at t=0, are you possibly dividing the block's input along the way by something that could be zero on simulati...

ongeveer 4 jaar ago | 0

Answered
Viewing figure is not possible.
matplotlib takes an explicit "show" command. Try: py.matplotlib.pyplot.show()

ongeveer 4 jaar ago | 1

Answered
Messagebox warning in matlab
The NCC return value you're getting back is a matrix of correlation values (for Lena, it's 512x512). The string you're passing t...

ongeveer 4 jaar ago | 0

| accepted

Answered
Printing outputs when running C code in simulink via the coder.ceval function
Not completely sure about this one, but if there is there a way to access the Simulink diagnostics panel from within the C code,...

ongeveer 4 jaar ago | 1

Answered
save animation ,i need help
Sofiane, Take a look at the VideoWriter and getFrame functions: https://www.mathworks.com/help/matlab/ref/videowriter.html Sp...

ongeveer 4 jaar ago | 0

Answered
I got this error while running a simulink model
You generally get this error when your simulation has an error that causes one of the states to grow exponentially until one of ...

ongeveer 4 jaar ago | 0

Answered
Loading and saving variables when using parallel toolbox
File access with parallel workers can be tricky, and in the past I've been successful by creating a separate temp directory per ...

ongeveer 4 jaar ago | 1

| accepted

Answered
How do I highlight very faint lines from an image?
Have you tried the Hough transform? https://www.mathworks.com/help/images/ref/houghlines.html

ongeveer 4 jaar ago | 0

Answered
Plot variables with similar names.
Are they already saved variables? If not, can you assign using a cell format instead? The mapping would look something like: v...

ongeveer 4 jaar ago | 0

Answered
Associate Map container with specific values
Map containers are a type of hash object, but not all MATLAB datatypes are hashable. The keys of containers are limited to a sub...

ongeveer 4 jaar ago | 0

Load more