Risposto
How can I create a function with several summations and Kronecker delta symbol in two dimension?
Here is the code, I do not check careful though % Dummy data alpha = [0 1; 1, 0; 1, 1; 2, 0; 0, 2]; beta ...

oltre 4 anni fa | 1

| accettato

Risposto
How to update GUI in matlab App during a callback
Try to force refresh with drawnow % Button pushed function: LoadButton function LoadButtonPushed(app, event) set(app.LoadBu...

oltre 4 anni fa | 1

| accettato

Risposto
How can I make a integration with trapz?
Note: The value is negative since x goes backward. v=[2.2696;2.2696; 2.4646;2.4646;2.6775;2.6775; 2.9101;2.9101;3.1644]; x=[0 ...

oltre 4 anni fa | 0

| accettato

Risposto
Adding nodes from a sub-graph to a larger graph
Build Abig as adjacent matrix of empty graph with 6 nodes, then insert A to Abig A = [0 0 1; 0 0 1; ...

oltre 4 anni fa | 0

| accettato

Risposto
How can a curved surface be generated with a thickness and density?
To generate random close surface, one might use spherical harmonics basis to deform a sphere. There is many library on FEX, I ch...

oltre 4 anni fa | 0

Risposto
Create a long rectangular signal with a function handle
myfun = @(t) mod(t,1)<=0.5; ezplot(myfun, 0, 20)

oltre 4 anni fa | 1

| accettato

Risposto
Making Graph from Delaunay Triangulation
The plot of graph the graph is not supposed to respect the distance, only connectivity. Since it 's not always possible to proje...

oltre 4 anni fa | 1

Risposto
How to run a Matlab script asynchronously from a Matlab app?
@Jan Bartels "The problem is that run("Matlab_File.m") is a blocking call, so even if I click on the "StartDataCollectionButton"...

oltre 4 anni fa | 0

Risposto
How to vary an element in a matrix?
If you have latest R2022a, use eig2 FEX (we are still waiting for TMW to implement pageeig) % System parameters k1=0.5*180:1.5...

oltre 4 anni fa | 0

Risposto
My eig function worked once and then broke
Don't use symbolic variable to build your matrices.

oltre 4 anni fa | 0

| accettato

Risposto
How Do I Move a Set of (x,y,z) Points so they Align with the X-Y Plane?
I guess what you describe as "but flatten it down from its z position"" or "move down" is that you want to rotate about the axis...

oltre 4 anni fa | 0

Risposto
Adding array to the end of another array
a=[ 1 2 3 4]; b=[ 5 6 7 8]; a = [a b]

oltre 4 anni fa | 1

Risposto
ppval and polyval giving different results
Here is a correct way to know how ppval works pp=spline(cumsum(rand(1,10)),rand(1,10)); x=3; ppval(pp,x) % i=discretize(...

oltre 4 anni fa | 1

| accettato

Risposto
Matlab doesn't release the C code execution until completion of the script
MATLAB is essential sequential/blocking behavior. Whereas you call a function from C or Matlab yo have to wait until completion....

oltre 4 anni fa | 0

| accettato

Risposto
Sampling from a population so that the sample has a target mean/median.
This is for "mean" (EDIT code for fixing BUG) % Generate 1e6 Dummy Data test A=10+sum(30*rand(1e6,3),2); % number of subsampl...

oltre 4 anni fa | 1

| accettato

Risposto
Create a new matrix
A=[ 4 2 7 4 3 5 6 8 8 1]; B= [4 6 7 8]; C = A(all(ismember(A,B),2),:)

oltre 4 anni fa | 0

| accettato

Risposto
Can matlab read binary real*8 data written by fortran?
Normally it's just a binary file of doubles fid = fopen(BinFilename,'rb'); data = fread(fid, 'double'); fclose(fid); you'll ...

oltre 4 anni fa | 0

Risposto
How can solving the boundary value problem using piece-wise linear finite elements on a uniform grid.
Just for fun (remind me my youth), it actually takes as little as 10 lines of MATLAB to solve it. % number of dicretization int...

oltre 4 anni fa | 0

Risposto
Generate Polynomial Expansion Orders as a matrix
You can use this FEX (also attached) allVL1(4,2,'<=')

oltre 4 anni fa | 0

| accettato

Risposto
Create least squares fit for linear combinations
I also make a flawed code of total leat squares earlier (under comment of Matt's answer), since dx and dxy are correlated so my ...

oltre 4 anni fa | 0

Risposto
How to get Matlab stop on my file upon error?
The problem has been solved in R2022a. Under R2021b here is the stack when debugger stops, one can see there is a dirty try/ca...

oltre 4 anni fa | 2

| accettato

Risposto
Find complementary column combination of a matrix
I start with MaxA, brute force method % Dummy test A = [8 4 0 8 8 4 8 0 8 0 4 0 4 0 0]; V = max(A,[ ],2); M...

oltre 4 anni fa | 0

| accettato

Domanda


Editor autocompletion frustration !
The feature is nice and in the same time very frustrating. Impossible to me to type a new variable name without the editor tryin...

oltre 4 anni fa | 1 risposta | 2

1

risposta

Risposto
How can i implement following sum notation ?
call (without y=...) soru(2,4) Your function is not supposed to return any output

oltre 4 anni fa | 1

Risposto
how to distinguish fft frequency is real existence or noise
You need to have a priori knowledge of the spectrum of the signal and the noise, and design an appropriate noise filter if the ...

oltre 4 anni fa | 1

Risposto
Creating an array for a set number iterations
F = 100000; i = 3; Ct= F*0.04.*ones(1,i); Ct(end) = Ct(end)+F

oltre 4 anni fa | 0

Risposto
superimposition of two similar 3D files without deformations
There are a bunch of ICP implementation in File Exchange

oltre 4 anni fa | 0

Risposto
Recognizing properties, methods and function names in Matlab code.
None of that is true. Some counter examples: set(obj, 'property', value) mymeth(obj, ...) obj.mymeth % no argument feval('my...

oltre 4 anni fa | 0

Risposto
partition column randomly in to three columns
A=rand(20,1) reshape(A(randperm(end,end-mod(end,3))),[],3)

oltre 4 anni fa | 0

| accettato

Risposto
How to show the roots of a polynomial in complex numbers?
Replace your fprintf statements with : fprintf('Root 1: x = %s \n',num2str(x1)) fprintf('Root 2: x = %s \n',num2str(x2))

oltre 4 anni fa | 0

| accettato

Carica altro