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

6 månader ago | 0

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

6 månader ago | 0

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

6 månader ago | 0

| accepted

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

7 månader ago | 0

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

7 månader ago | 0

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

7 månader ago | 0

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

7 månader ago | 0

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

7 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

8 månader ago | 0

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

9 månader ago | 0

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

9 månader ago | 0

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

9 månader ago | 0

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

9 månader ago | 0

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Solved


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

11 månader ago

Load more