Answered
How to generate following signal using MATLAB script file? signal s(t) is changing its value in every 20 seconds
Take the time mod() 20. If the result is < 10 then output 0. Otherwise take the ceiling of the time divided by 20 and output tha...

4 years ago | 0

Answered
I can't use angvel()
angvel() is not an independent function: it is a method for the quaternion class, and can only be accessed if your first paramet...

4 years ago | 1

Answered
How to solve multiple n^th order differential equation using single ode45?
To set up something like that, I recommend using the Symbolic Toolbox to construct the equations. Then you can use odeToVectorFi...

4 years ago | 0

Answered
Current compiler MinGW64 Compiler (C++) is not supported for ROS build. To choose a compiler, run 'mex -setup cpp'.
https://www.mathworks.com/support/requirements/supported-compilers.html Look under the ROS column: you need to use Visual Studi...

4 years ago | 2

Answered
Putting symbolic array into matrix
That code works in the form you posted. syms q0 Vy=[300 500 300] q(1,:)=[q0-(Vy.*2.*4./8)] The most common mistake for somet...

4 years ago | 1

| accepted

Answered
I would like my code to allow the user to plot as many circles as they want until the user right clicks, if the circle plotted intersects any other circle it must change color
Two circles intersect if the distance between their centers is less than or equal to the sum of their radii, except when one of ...

4 years ago | 0

Answered
How to plot the value in a graph (that i circled) with a MATLAB Function ?
To do that through commands, you could have code that first copied the .slx file to a different model. Then use a bunch of set_p...

4 years ago | 0

Answered
3D cuboid elements display
See https://www.mathworks.com/matlabcentral/answers/892652-anybody-help-me-by-providing-matlab-code-for-the-three-dimensional-hi...

4 years ago | 0

| accepted

Answered
I got a error of symengine
Q_1 is a row vector, so V_1 is a row vector, so Re_1 is a row vector. You have 2.51/(Re_1.*sqrt(F_1D)) . Since Re_1 is a row ve...

4 years ago | 0

Answered
V12(:,:,h)=(((tau2(:,:,h)-tau2R(:,:,h)).^2+((tau3(:,:,h)- tau3R(:,:,h)).^2).^0.5)./7)));
You have a number of "zero-width space" characters in your code, such as immediately before the "=" character. You have to fix t...

4 years ago | 1

| accepted

Answered
why I am getting function error
That function appears to be part of the File Exchange contribution https://www.mathworks.com/matlabcentral/fileexchange/12401-op...

4 years ago | 0

Answered
Trying to write micro symbol in an axis label in matlab in non italics.
That is not supported in latex without the equivalent of amsfont package. Math mode always italicizes the greek letters unless y...

4 years ago | 2

| accepted

Answered
Passing a file by function
fid = fopen(filenames ,'wt'); You opened the file for writing, but you immediately try to read it. Note that you fail to...

4 years ago | 0

Answered
Matrix from measured data is singular, what could be the reason?
syms dj1 dj2 dji dU1 dU2 dUi j1 j2 ji k1 k2 A=[ dU1/dj1 k1/j1 k2 -1 j1 dU2/dj2 k1/j2 k2 -1 j2 dUi/dji ...

4 years ago | 0

Answered
Save values of power in a file without overwritting previous ones
P = 1:2; Q = 11:12; save ('PQ.txt','P','Q','-ascii','-append') dbtype PQ.txt P = 21:22; Q = 31:32; save ('PQ.txt','P','Q','-...

4 years ago | 0

Answered
Pass objects into function
You are using a value class, not a handle class. You change h.data inside the chg function, and that revised object gets returne...

4 years ago | 0

| accepted

Answered
how to change specific color define by the user to black in matlab?
maskY= originalImage(:,:,1) < 200 & originalImage(:,:,2) > 200 & originalImage(:,:,3) < 10; That is incorrect. Look at https:/...

4 years ago | 0

Answered
Standard individual perpetual licence: what happens after ending the software maintenance service
You are correct. SMS entitles you to new releases during the time you are under support SMS for Standard licenses entitles you...

4 years ago | 0

| accepted

Answered
Matlab/Simulink does not detect Raspberry Pi 4
You might need R2020b https://www.mathworks.com/help/supportpkg/raspberrypiio/release-notes.html R2020b Fixed Raspberry Pi 4...

4 years ago | 0

Answered
Matrix is singular to working precision
Look at the third-last column of M, and notice that it is all zero. When you have a column that is all zero then the column rank...

4 years ago | 1

Answered
Values Stored in Matrix not showing all decimals
There are a few different possible meanings here. If you are using the Variable Browser, then the display format for each item ...

4 years ago | 0

| accepted

Answered
Image warning about downscaling for preview?
See https://www.mathworks.com/matlabcentral/answers/102829-why-do-i-receive-a-black-preview-window-with-videoinput-preview#answe...

4 years ago | 0

Answered
How to generate random numbers with constraint?
First branch consists of following numbers 1>2>3>4>5>6>7>8>9>10>11>12, second brach starts at number 3 of first branch and consi...

4 years ago | 0

Answered
Is there a RAM efficient way to export a video?
If possible, instead of displaying the frames and drawing on them and using export graphics, try using Computer Vision Toolbox i...

4 years ago | 1

Answered
How to set a string as a CODE in script file?
validcodes = {'SU', 'DI'}; while true choice = input('Enter a code: ', 's'); if strcmpi(choice, validcodes); break;...

4 years ago | 0

Answered
Using Matlab to create a LaTex document (for image import)
fileID = fopen('./incl_img_latex.txt', 'w'); files = dir('path'); files([files.isfolder]) = []; %remove . and .. and any...

4 years ago | 1

| accepted

Answered
fitcensemble optimize hyperparameters without showing plots
fitcensemble(X,Y,'OptimizeHyperparameters','auto', 'HyperparameterOptimizationOptions', struct('ShowPlots',0))

4 years ago | 0

| accepted

Answered
How to save unint16 class as tiff image.
See https://www.mathworks.com/matlabcentral/fileexchange/30519-export-image-to-tif-or-tiff-file-of-selected-data-type?s_tid=srch...

4 years ago | 1

Answered
How do I Read a file line by line after a certain character?
If the file fits into memory, then filename = 'FileNameGoesHere.ExtensionGoesHere'; S = fileread(filename); next_lines = reg...

4 years ago | 0

Answered
Error with audio from pushbutton
A = A ./ max(A(:)); My guess at the moment is that your A is empty.

4 years ago | 1

| accepted

Load more