Réponse apportée
How can I change the number of ports for VariantSource programmatic?
Hey Martin, I looked into the "blockHandle" for the "Variant Source" block and found that the "VariantControls" property is ...

8 mois il y a | 0

Réponse apportée
How to generate random values from tlocationscale distributions ?
Hey Rita, In MATLAB, you can generate random numbers from a t location-scale distribution using the “makedist” and “random” ...

8 mois il y a | 0

Réponse apportée
Export a scaled graph to pdf for printing
Hey Luke, I tried out the code you shared and made a few adjustments that should help ensure your PDF exports exactly t...

8 mois il y a | 0

| A accepté

Réponse apportée
Plot 3D array
Hey Auryn_ Assuming random values for your variable “k” the code below explains how to plot in 3D using “surf”: % Ini...

9 mois il y a | 0

Réponse apportée
Code showing error how to correct the code?
Hey Suchitra, After running your code once I found out the error you are encountering is due to a size mismatch in your elemen...

9 mois il y a | 0

Réponse apportée
What does added variable plot meen?
Hey Avnor, An added variable plot, also known as a partial regression leverage plot, illustrates the incremental effect on the...

9 mois il y a | 0

Réponse apportée
Code and plot error bounds timeseries data
Hey Fatemah, As mentioned in the link provided, “errorbar()” function would be the best bet for your use case. For the e...

9 mois il y a | 0

Réponse apportée
Initialize Values to Inports in Embedded Coder
Hello Atif, I've experienced a similar situation, and I found that Code Mappings provided an effective solution. In Simulink...

9 mois il y a | 0

Réponse apportée
Error in 1st line of code
Hey Manali, The issue seems to be in the first line of the definition of “MSD” function. You have used “zeroes” instead ...

10 mois il y a | 0

Réponse apportée
Can anyone help me to rectify the error?
Hey Sudipa, I ran your code on my end and was able to reproduce the errors you encountered. Based on the R2024b definition ...

10 mois il y a | 0

Réponse apportée
eQEP block for speed calculation with C2000
Hey Marwa, I recently worked on a similar project and found some documentation on the MathWorks website incredibly hel...

10 mois il y a | 0

Réponse apportée
convert json to integer
Hey Ozcan, I believe what you want to do can be achieved using regular expressions to parse the string and then convert the ...

10 mois il y a | 0

Réponse apportée
How can I plot a rectified square wave from sine waves?
Hey W M, It looks like you are trying to generate a rectified square wave using symbolic summation, which can be computation...

10 mois il y a | 0

Réponse apportée
How to convert 3D .nii to .mat vector?
Hey Wasna, The niftiread() function can help you do that very easily. The niftiread(your_file), function reads and retur...

10 mois il y a | 0

Réponse apportée
How to save high resolution plots without displaying it on the screen?
Hey Mr. M, It sounds like the exportgraphics() function could be just what you need. This function allows you to save a plot w...

10 mois il y a | 0

Réponse apportée
Using MATLAB simulink and STM32 for PID controller
Hey Rosy, I recently worked on a similar project, and I found a couple of resources incredibly helpful. There's a video on YouT...

10 mois il y a | 0

Réponse apportée
plotting a sphere using isonormal
Hello Oanh, Below is the code that produces a 3D sphere using isonormals: % Define the grid [x, y, z] = meshgrid(linspace(...

10 mois il y a | 0

Réponse apportée
Error when using isonormals on meshgrid after applying pol2cart
Hey Michael, I encountered a similar issue when trying to use “isonormals” after applying “pol2cart”. After researching the...

11 mois il y a | 0

Réponse apportée
simulink scope: adjust axis tick mark intervals (R2015b)
Hey, I was facing the same issue, and  I found a workaround that worked well for me using the "To Workspace" block. This method ...

11 mois il y a | 0

Réponse apportée
Data not displaying on graph (field chart 1 and field chart 2)
Hey Huang, Assuming you are using function “webwrite”, you can probably try enabling “Show Status” checkbox on the channel set...

11 mois il y a | 0

Réponse apportée
Hardware Setup for C2000" – Unable to Proceed After Selecting Process Family
Hey Sushan, I was facing a similar issue and found that the window was truncated due to text size setting being more than 1...

11 mois il y a | 0

A résolu


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

environ un an il y a

A résolu


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as y = A.ⅇ^(-λt)*cos(2πft) where A, λ, and f are scalars and t is a vector. ...

environ un an il y a

A résolu


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

environ un an il y a

A résolu


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

environ un an il y a

A résolu


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

environ un an il y a

A résolu


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

environ un an il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

environ un an il y a

A résolu


Inner product of two vectors
Find the inner product of two vectors.

environ un an il y a

A résolu


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

environ un an il y a

Charger plus