A résolu


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

environ 4 ans il y a

A résolu


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.

environ 4 ans il y a

A résolu


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.

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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]

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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.

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
Viewing figure is not possible.
matplotlib takes an explicit "show" command. Try: py.matplotlib.pyplot.show()

environ 4 ans il y a | 1

Réponse apportée
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...

environ 4 ans il y a | 0

| A accepté

Réponse apportée
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,...

environ 4 ans il y a | 1

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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 ...

environ 4 ans il y a | 0

Réponse apportée
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 ...

environ 4 ans il y a | 1

| A accepté

Réponse apportée
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

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Réponse apportée
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...

environ 4 ans il y a | 0

Charger plus