Solved


Remove the diagonal of a square matrix
Some Cody problems ask solvers to remove columns (e.g., CP 7), and others ask solvers to remove rows (e.g., CP 44033). Write a...

27 dagen ago

Solved


Conditional transpose II
As in problem 60734, you're given two vectors, x and y, which might be row or a column vectors. Your task is to ensure that y ha...

27 dagen ago

Solved


Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements. * Assume all input matrices are square & corresponding element...

27 dagen ago

Solved


Find out if the given number is a square of natural number.
For example , Input =4,output =1 Input=1,output=1 Input=0,output=0 Input=8,output=0

27 dagen ago

Solved


Describe n from right to left
If you were to describe the number 46 from right to left, you could say “one 6, one 4”, or 1614. The number 8663 would be “one 3...

27 dagen ago

Solved


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

27 dagen ago

Solved


Beads on a Necklace (Convex Hulls)
We may describe a <http://en.wikipedia.org/wiki/Convex_hull convex hull> as a rubber band stretched around a list of points. Som...

27 dagen ago

Answered
A parfor loop and random number generator
Use RandStream to give each worker a common random number stream. test_for_parfor(0) output = 60 291 379 808 77...

ongeveer een maand ago | 1

Answered
Error with 1dPooling in dlnetwork
You can use functionLayers to reformat the activations as the averagePooling layers require, but make sure you set the spatial d...

ongeveer een maand ago | 0

Answered
MATLAB Not Working After Update
I would try doing a clean reinstall, i.e., with all previous installation folders deleted. Failing that, you will probably need ...

ongeveer een maand ago | 0

Answered
Steepest descents methods algoritme for higher dimensional objective functions
See fminunc, fmincon, and perhaps also, https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differentia...

ongeveer een maand ago | 0

| accepted

Answered
How can I keep the non-Matlab command window open after executing an executable by double clicking it?
There is very little context provided by the question, but if it is an executable created with the Matlab Compiler, then for exa...

ongeveer een maand ago | 0

| accepted

Answered
What is the easiest way to provide the user with a compiled version of a matlab function so that he can run without having the source?
If the idea is to obscure the source code, consider, https://www.mathworks.com/help/matlab/matlab_prog/building-a-content-obscu...

ongeveer een maand ago | 1

| accepted

Answered
How to give arguments to fmincon using ssest in system identification toolbox?
Perhaps as follows, opts=ssestOptions(SearchMethod='fmincon'); opts.SearchOptions.Algorithm='trust-region-reflective'; opts...

ongeveer een maand ago | 0

| accepted

Answered
Trying to reshape/reformat data set into multiple sets
Using mat2tiles, downloadable from, https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-array-into-equa...

ongeveer een maand ago | 0

Answered
How to batch close the open variable window
You can try, com.mathworks.mlservices.MatlabDesktopServices.getDesktop.closeGroup('Variables')

ongeveer een maand ago | 0

Answered
Derivative of a multivariate function handle
Is this what you want? syms y [1 2] g = [y(1)*cos(y(2))+y(2)*sin(y(1))-0.5]; Jfun=matlabFunction(jacobian(g,y)) Jfun(0...

ongeveer een maand ago | 0

Answered
Determine if a point is inside a cube
Assuming the cube is not rotated, vertices = [ -1, -1, -1; -1, -1, 1; -1, 1, -1; -1, 1, 1; 1, -1,...

ongeveer een maand ago | 0

Answered
How to use splitapply function with a grouping variable which is a cell array in my table?
groupingVar = {'A', 'X'; 'A', 'Y'; 'B', 'X'; 'B', 'Y'; 'A', 'X'; 'A', 'Y'; 'B', 'X'; 'B', 'Y'; 'A', 'X'; 'A', 'Y'}; G=findgro...

ongeveer een maand ago | 0

Answered
find unique array cell with 2 field
>> findgroups(f(:,1),f(:,2)) ans = 1 1 3 2

ongeveer een maand ago | 0

| accepted

Answered
Question regarding calling the destructor of a broadcast variable in parfor.
It is because you have 6 workers in your parpool. Therefore, a copy of Mage is sent to each worker, for a total of 6, during par...

ongeveer een maand ago | 0

| accepted

Answered
find unique array cell with 2 field
load('matlab_f.mat') table2cell(unique(cell2table(f),'rows'))

ongeveer een maand ago | 0

Answered
Problem with ploting involving function handle
Perhaps this is what you meant? N= 600; COMx_k = @(k) real(sum(1.*exp(-2*pi*1i*(k/N).*(1:N)' ),1)); %k=0:0.1:300 fplo...

ongeveer een maand ago | 0

| accepted

Answered
how to change the image from axial to sagittal
imtool3D() is not a native Matlab function, but I imagine if you permute your data permute(data,[3,1,2]) so that its slices are ...

ongeveer een maand ago | 0

| accepted

Answered
How to add an NVCC flag
Downgrade to Visual Studio 2019. See also, https://www.mathworks.com/matlabcentral/answers/2158705-mexcuda-can-t-find-visual-st...

ongeveer een maand ago | 0

Answered
starting vector (zero vector) equals lower bounds but gets projected to non-zero vector
This behavior is specific to the interior-point algorithm. As the name suggests, an interior-point algorithm must start at an in...

ongeveer een maand ago | 1

Answered
Finding concave hull around abstract shape
ps = load('matlab_answer_example.mat').new_polyShape1; tic; V=cell2mat(arrayfun(@(i) upsamp(polybuffer(ps,-i)),[0,1],'Unifor...

ongeveer een maand ago | 1

Question


mexcuda() can't find Visual Studio 2022, but mex() can.
In R2024a, I encounter the following when trying to compile with mexcuda in conjunction with Visual Studio 2022. >> mexcuda -la...

ongeveer een maand ago | 1 answer | 0

1

answer

Answered
loading and training an existing network.
previous = load("savednet","net","layers"); net = trainNetwork(data,clabels,previous.net,options);

ongeveer een maand ago | 0

| accepted

Answered
Interpolate and plot a surface in a rotated coordinated system
I'm not familiar with the FEX submission you used, but I can show how I would do it with this one, https://www.mathworks.com/ma...

ongeveer een maand ago | 0

Load more