Answered
Find the position of numbers in array
percent_present = mean(ismember(SmallVector, LargeVector)) * 100

4 years ago | 0

Answered
The source code for the parfor-loop could not be found
Sometimes you need to addAttachedFiles; https://www.mathworks.com/help/parallel-computing/parallel.pool.addattachedfiles.html

4 years ago | 0

| accepted

Answered
create a function from temperature data
If you have the Curve Fitting Toolbox, you can use curvefitter() https://www.mathworks.com/help/curvefit/curvefitter-app.html . ...

4 years ago | 0

Answered
How to fill just such successive elements in row of matrix?
Consider for example, A(i : min(i+k-1, end), j) This would refer to at most k consecutive rows starting at row i but would sto...

4 years ago | 0

Answered
Extracting envelope using hilbert transform
According to the documentation, the real part of the return value is the same as the input value, and the hilbert transform is s...

4 years ago | 1

Answered
How to put bounds and delete certain rows from a matrix.
In MATLAB, if you use logical indexing to delete entries from an array, then the result you get is a column vector in linear ind...

4 years ago | 0

Answered
Retrieve data from a guidata from another file
handles_hf = guidata(hf); if handles_hf.X.Value == 1

4 years ago | 0

| accepted

Answered
Calculate the area of geometry
The first thing you need to do is decide how the user is going to represent the specific shape for calculation purposes. are y...

4 years ago | 0

Answered
How to distribute random points outwards from a center location?
cx = 3; cy = 5; %as appropriate R = 20; N = 1000; theta = rand(1, N) * (2 * pi); rbase = rand(1,N) * R; [X, Y] = pol2cart...

4 years ago | 1

| accepted

Answered
Problem using variable='z^-1' in Z transform with Z^-1 format
Setting the Variable property afterwards just changes the Variable property, without reinterpretting the matrices. It is not a c...

4 years ago | 0

Answered
MAJOR 25+ YEAR OLD MATLAB BUG. PLEASE, PLEASE FIX! Ctrl-C doesn't work, no way to stop a process.
| appreciate that there are issues with OS implementations, eg memory management, that make this a challenge. That said, I'm qu...

4 years ago | 1

Answered
got new laptop; can't access matlab from it
https://www.mathworks.com/downloads/ for downloads. You will probably need to deactivate against the old system to activate on ...

4 years ago | 0

Answered
Has anyone got aaS Matlab toolbox I need it soon kindly help I will be very grateful to you
The current student software downloads are linked from https://www.ansys.com/academic/students Ansys aaS appears, however, to ...

4 years ago | 0

Answered
find 1s in the Matrix
firstcol = 48; lastcol = 65; offsetcol = 14; idx = firstcol:lastcol; offsetidx = idx-offsetcol; result = YourMatrix(:,offse...

4 years ago | 0

| accepted

Answered
Drawing a boundary box around an image?
My goal is to create a bounding box around the non-zero pixel value region of my image. filename = 'https://www.mathworks.com...

4 years ago | 0

| accepted

Answered
Poisson distribution and discrete distribution
fitdist allows you to fit a distribution to data. I want to fit Y to a Discrete distribution There are an infinite number of d...

4 years ago | 0

Answered
creating a function nonpivotcols that takes a m*n matrix as input and produces a matrix consisting of the nonpivot columns of the input
[R pcols]=rref(A); A(:,pcols)=[]; You deleted the pivot columns out of A. Whatever is left must be non-pivot columns. [r,fcol...

4 years ago | 0

Answered
What does it mean to "% extract t and h(t) for time range 5.0<=t<=12.0" when "h=4.0+6.0*t*10^-0.5-(4*10^-0.25)*cos(0.75*pi*t)"?; when
One way: Loop over the indices of the vector of t. At each point, make the "current" t equal to the t vector indexed at the cur...

4 years ago | 0

Answered
Select multiple radiobutton at the same time
hf=exemple; You run the code in exemple and it returns. You are no longer running any code inside exemple but it set up sev...

4 years ago | 0

Answered
Cannot execute Figure(3).
q=[0.000000025;0.000000034;0.000000042]; %Calculate manually on 0.75Q, Q, 1.25Q; f=1-exp(-(((k*pi*d)/q))*z); The / opera...

4 years ago | 0

Answered
Unrecognized function or variable 'Fid2'.
l = fgetl(FID); if strcmp(l(1),'**') fgetl returns a character vector (except at end of file) l(1) will be a sing...

4 years ago | 1

| accepted

Answered
Simulink files compatibility with MATLAB versions
Yes. The Function Block (not the same as MATLAB Function Block) no longer exists. You might want to hold on to one of your previ...

4 years ago | 0

Answered
GPU coder :basic Code Generation failed
I think Cuda Toolkit 11.6 is not supported in your release. I am having difficulty finding the toolkit version that is supported...

4 years ago | 0

Answered
which part of my logic is wrong?
You used the / operator. The / operator is matrix division. P/Q is approximately P*pinv(Q) . In situations such as yours with ro...

4 years ago | 1

| accepted

Answered
trisurf: Removing Unwanted Lines and Surfaces from Irregular 3D Plot
You should not do this at the trisurf() level; you should be creating a modifed triangulation https://www.mathworks.com/help/ma...

4 years ago | 0

Answered
3D plot in Simulink
XY Graphs are specifically documented to open a different window for each block, and only permit scalar X and scalar Y. But you ...

4 years ago | 0

Answered
Calculating Hessian without using symbolic functions
No, not unless you can calculate it by hand ahead of time using some other set of external tools. You can estimate the Hessian....

4 years ago | 0

| accepted

Answered
out of memory error
Pre-allocate out to the final size. This will reduce temporary memory use. Also, using : is more memory efficient than indexing ...

4 years ago | 0

| accepted

Answered
How do I prevent MATLAB from converting characters into their ASCII equivalent?
zeros() creates a numeric array, with a default data type of double() Any time you assign a char() into a numeric array, MATLAB...

4 years ago | 0

Answered
Incorrectly getting a blank video when using videowriter function to display data
You are not changing the display between getframe() so all of the frames would be the same. If you have pre-computed frames sto...

4 years ago | 0

| accepted

Load more