Respondida
Split matrix into square cells
Use the histcounts2 function.

más de 4 años hace | 2

Respondida
How to publish as pdf from command tab
To do this using the publish function use the codeToEvaluate name-value pair argument as shown in the "Generate HTML View of MAT...

más de 4 años hace | 1

| aceptada

Respondida
how to draw contour plot
There are a couple potential problems here. Did you really mean to make x a 1-element vector or did you mean to go from 0 to 1 i...

más de 4 años hace | 1

Respondida
Hi, do you know why I can't open the variable window by doule clicking any variables?
My suspicion is that you've written or downloaded a function with the same name as one of the functions included in MATLAB that ...

más de 4 años hace | 1

Respondida
To get x and y coordinates of the edges in a Delaunay Triangulation
Let's build a sample delaunayTriangulation using the first example on its documentation page. rng default; P = rand([30 2]); ...

más de 4 años hace | 1

| aceptada

Respondida
Event in ode45 doesn't work
You don't want to use == in defining the first output of your event function. That will make the value of your event function 0 ...

más de 4 años hace | 0

Respondida
Create MException object with a custom non-empty stack (without actually throwing it)
Preallocate a cell array. M = cell(1, 3); Run the code that may throw an error. If it does, catch the error in the appropriate...

más de 4 años hace | 0

Respondida
Animated 3D Scatter Plot
Rather than recreating the scatter plot each time, I'd apply the first of the techniques listed on the Animation Techniques docu...

más de 4 años hace | 1

Respondida
Why this piece of code gives error?
Either make your CostFunction variable a function handle to the fun4sn0 function (which is the approach I'd prefer): CostFuncti...

más de 4 años hace | 0

| aceptada

Respondida
ode return NaN :(
What is at time t = 0? By your formula 14 it is times other stuff. Let's ignore that other stuff and look at the value of that...

más de 4 años hace | 1

Respondida
Draw the 3-D plot for the function f(t)= (t, t ^2, t ^3), where 0 <= t <=100.
You're close. f=(t,t^2,t^3); Instead of trying to define f like this (and then not using it) define the variables x, y, and z ...

más de 4 años hace | 0

| aceptada

Respondida
I got something wrong with the hep document
Check if you've written or downloaded a split.m file that's taken precedence over the split function included in MATLAB. which ...

más de 4 años hace | 1

| aceptada

Respondida
Property value validation with values from file
The census.mat file contains two variables, cdate and pop. whos -file census.mat Let's write a function that will retrieve the...

más de 4 años hace | 0

| aceptada

Respondida
I want to extract the linear x and y data from the overall data. I have version 2017a in which "ischange" function is not present any alternatove method
So you want to detrend your data? The detrend function has existed since before release R2006a.

más de 4 años hace | 0

Respondida
Parse error at " end "
When you get a parse error like this, look for the Code Analyzer messages in the Editor's right margin. Of particular importance...

más de 4 años hace | 0

| aceptada

Respondida
Where can I find Fcn block in simulink in matlab R2022a?
Which of the blocks in the User-Defined Functions library do you want to use? I'm guessing you want either MATLAB Function or I...

más de 4 años hace | 1

Respondida
How to get the sum of the rows of a matrix?
Use the sum function.

más de 4 años hace | 0

| aceptada

Respondida
I want the matlab code of Discrete Tchebichef Transform and its inverse version
https://www.mathworks.com/matlabcentral/answers/88670-is-there-a-code-in-matlab-for-discrete-tchebichef-transform-dtt?s_tid=answ...

más de 4 años hace | 0

Respondida
Answers of equation are mismatch
Use element-wise operations instead of array operations. h = linspace(24,62.5,20); % Height of Trapzoid w = 81-0.54...

más de 4 años hace | 1

Respondida
Simplifying Complex expressions in Matlab Symbolic Toolbox
Did you mean to assume that x, y, xv, yv, and/or T are real? syms x1 y1 real syms x2 y2 z1 = x1 + 1i*y1 z2 = x2 + 1i*y2 z1c...

más de 4 años hace | 0

Respondida
weird Matlab+Windows Scheduler Behavior
The Add Arguments is set to -r -nodesktop -nosplash "run GBB_lvl1" So you're telling MATLAB to run a command (with the -r optio...

más de 4 años hace | 1

| aceptada

Respondida
Create variable number of random streams (unique, deterministic, independent)
See the "Substreams" and "Restore State of Random Number Generator to Reproduce Output" sections on this documentation page for ...

más de 4 años hace | 0

| aceptada

Respondida
How to increase number of contour lines in a plot?
f = @(x1,x2) (x1-5).^2+(x2-4).^2; % Vectorized the function h = fcontour(f,[0 10 0 10]); % Let MATLAB choose the number and hei...

más de 4 años hace | 1

Respondida
Equality operator error with exact same value
This is not a bug. See the section "Avoiding Common Problems with Floating-Point Arithmetic" on this documentation page.

más de 4 años hace | 0

| aceptada

Respondida
Minimize a function under several constraints
Any values that satisfy your first two constraints are a solution to the problem since your objective function is constant. Subs...

más de 4 años hace | 0

Respondida
How to create a function that checks if a word is a palindrome?
A recursive approach, like you've tried to implement, can work but one important aspect of recursion is the base case. This is t...

más de 4 años hace | 0

Respondida
Transformation of attached C++ code to MATLAB code.
Are you required to convert this code or would being able to call it from within MATLAB be sufficient for your needs? If the lat...

más de 4 años hace | 0

Respondida
If I have a matrix, how can I find the minimum5 values in it?
Use the mink function.

más de 4 años hace | 0

Respondida
NEWPR and NEWFF .
They are extremely old functions in Deep Learning Toolbox (when they were marked as obsolete in release R2010b, the toolbox was ...

más de 4 años hace | 0

Respondida
Randomness is lost in parfor loop on GPU?
What I'm doing is to copy this code and change the value of the seed. For example, the "my_code_seed1.m" uses "seed = 1", and "m...

más de 4 años hace | 0

Cargar más