Risolto

Swap between columns

The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

10 giorni fa

Risolto

Remove a specific character with another

Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

10 giorni fa

Risolto

Swap between first and last

The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

10 giorni fa

Risolto

Swap between first and last column

The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

10 giorni fa

Risolto

Swap between rows

The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

10 giorni fa

Risolto

Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n ).

Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n )...

11 giorni fa

Risposto

How to access the n-th caller workspace?

Since getObjPath() is a Static method, why not just do, function pathOutMod=getOrigClassPath() origClassPa...

How to access the n-th caller workspace?

Since getObjPath() is a Static method, why not just do, function pathOutMod=getOrigClassPath() origClassPa...

11 giorni fa | 0

Risolto

Digits eliminate

Complete the function my_f(n,b) to return, for a given integer, the number obtained by removing the digits '0' and 'b'. If there...

12 giorni fa

Risolto

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...

12 giorni fa

Risolto

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...

12 giorni fa

Risolto

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...

12 giorni fa

Risolto

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

12 giorni fa

Risolto

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...

12 giorni fa

Risolto

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 ...

12 giorni fa

Risolto

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...

12 giorni fa

Risposto

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...

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...

16 giorni fa | 1

Risposto

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...

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...

16 giorni fa | 0

Risposto

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 ...

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 ...

16 giorni fa | 0

Risposto

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...

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...

16 giorni fa | 0

| accettato

Risposto

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...

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...

16 giorni fa | 0

| accettato

Risposto

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...

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...

16 giorni fa | 1

| accettato

Risposto

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...

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...

20 giorni fa | 0

| accettato

Risposto

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...

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...

22 giorni fa | 0

Risposto

How to batch close the open variable window

You can try, com.mathworks.mlservices.MatlabDesktopServices.getDesktop.closeGroup('Variables')

How to batch close the open variable window

You can try, com.mathworks.mlservices.MatlabDesktopServices.getDesktop.closeGroup('Variables')

23 giorni fa | 0

Risposto

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...

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...

25 giorni fa | 0

Risposto

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,...

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,...

25 giorni fa | 0

Risposto

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...

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...

25 giorni fa | 0

Risposto

find unique array cell with 2 field

>> findgroups(f(:,1),f(:,2)) ans = 1 1 3 2

find unique array cell with 2 field

>> findgroups(f(:,1),f(:,2)) ans = 1 1 3 2

25 giorni fa | 0

| accettato

Risposto

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...

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...

25 giorni fa | 0

| accettato

Risposto

find unique array cell with 2 field

load('matlab_f.mat') table2cell(unique(cell2table(f),'rows'))

find unique array cell with 2 field

load('matlab_f.mat') table2cell(unique(cell2table(f),'rows'))

25 giorni fa | 0