답변 있음
generate all variations on a 20-mer, that are 1 to 4 mismatches away
Using blkColon from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/115340-block-transposition-permutat...

대략 3년 전 | 0

| 수락됨

답변 있음
How can I make the numeric edit field blank?
You can set the ValueDisplayFormat property to %0.0d

대략 3년 전 | 1

| 수락됨

답변 있음
How can we increase/decrease the number of triangles in a triangulation that is created from a polyshape object?
Another way: p1=nsidedpoly(6); p2=p1.scale(0.5); P=subtract(p1,p2); P=subTri(P); for i=1:3 P=splitTri(P); end pl...

대략 3년 전 | 0

답변 있음
creating multiple arrays that all have the same name with different number
You wouldn't do that. You would instead combine all the calculations into a single matrix Gcr: density = 1000; g = 9.8; gamma...

대략 3년 전 | 1

| 수락됨

답변 있음
How can we increase/decrease the number of triangles in a triangulation that is created from a polyshape object?
To increase the number of triangles, you would have to add vertices along the edges, like in the following: p1= polyshape([0,0;...

대략 3년 전 | 0

답변 있음
How to make the output size of imwarp the same as the input?
There is an OutputView input parameter that will let you control that, https://www.mathworks.com/help/images/ref/imwarp.html#bt...

대략 3년 전 | 0

| 수락됨

답변 있음
Optimization to fit a curve to data (problem with the InitialPopulationMatrix)
Instead of x = 1:size(Data,2); perhaps try a more normalized range of x, e.g., x=linspace(0,1,size(Data,2))

대략 3년 전 | 0

| 수락됨

답변 있음
Solving for different types of variables on large dataset with lsqnonlin
You could imoplement a nested optimization, with the outer optimization over a done with fminsearch while that over T can be don...

대략 3년 전 | 1

| 수락됨

답변 있음
How to assign elements in a vector to an entry in a structure array variable?
You could also consider using a table instead, Names=["Jon","Phil","Bob","Gary"]'; T=table(Names,nan(size(Names)), 'Var',["N...

대략 3년 전 | 0

답변 있음
How to assign elements in a vector to an entry in a structure array variable?
You could also consider using dictionaries instead of a struct array, Names=["Jon","Phil","Bob","Gary"]; D=dictionary(Names,...

대략 3년 전 | 0

답변 있음
change outputlayer in layergraph object
For example, lgraph=layerGraph(regressionLayer) layers=lgraph.Layers; layers(end).Name='newName'; lgraph=layerGraph(la...

대략 3년 전 | 0

| 수락됨

답변 있음
I have data in 3D array and I know indices in the first two dimensions. How do I collect all data without for loop?
One way Data(:,:,1) = [1,2,3 4,5,6 7,8,9]; Data(:,:,2) = [11,22,33 44,55,66 77,88,99]; idxRow = [1,1 ...

대략 3년 전 | 0

답변 있음
How to assign elements in a vector to an entry in a structure array variable?
But I want to avoid loops because my code is already within another large loop which is slow. When dealing with structs, there ...

대략 3년 전 | 0

| 수락됨

답변 있음
Passing a variable constraint to fmincon
I think this is what you mean, for nn=1:N ynn=y(nn); FUN = @(x)((sqrt((x(1) - a)^2 + (x(2) - b)^2) + sqrt((x(1) - ...

대략 3년 전 | 0

| 수락됨

답변 있음
Convolutional neural networ for classification problem with matrices instead of images
Since I'm dealing with .csv files i have to use the "tabularTextDatastore" command to create the datastore. No, just use an ima...

대략 3년 전 | 0

답변 있음
I'd like to remove variables (columns) containing specifc name
One way, idx=contains(T.Properties.VariableNames,"_B" | "_A"); %T is your table T(:,idx)=[];

대략 3년 전 | 0

답변 있음
Inverse of a matrix
%Fake input data B=rand(100); X1=rand(100,1); X2=rand(100,1); A=B*(X1+X2); %Now invert X2_recovered=B\(A-B*X1); norm(...

대략 3년 전 | 0

| 수락됨

답변 있음
how can i extract features just before full connected layer : extract the features from the flatten layer
Use the activations command, act = activations(net,yourInput,14);

대략 3년 전 | 0

답변 있음
how can i extract features just before full connected layer : extract the features from the flatten layer
Convert the network to a dlnetwork and remove the last two layers. lgraph=layerGraph(net); lgraph(end-1:end)=[]; %remove outpu...

대략 3년 전 | 0

답변 있음
add image to legend label
The easiest way I can think of is to make several subplot axes, including one containing the line plot subplot(1,2,1); plot(1:5...

대략 3년 전 | 0

답변 있음
How to make variables stored in cell arrays always show up as data type and size instead of listing the elements?
I don't think there's any way to do it in the variable editor, but you can do it at the command line using this solution, https...

대략 3년 전 | 0

| 수락됨

답변 있음
How do I exact all the indexes with a certain value?
Don't use a loop. Just do, marker = Inpt_RZ2_chn002.dat > 3; The logical vector marker already functions as an index vector, e...

대략 3년 전 | 0

| 수락됨

답변 있음
I keep having an error pop up for line 5. I'm trying to output 'm' sample pairs based off of the PMF of randomized variables X and Y
Your Px vector has 9 values but your X vector has only 5. They are expected to be of the same length.

대략 3년 전 | 0

| 수락됨

답변 있음
plot line with function but doesn't appear like i want
plot([0,3.758,10] , [5,0,-3],'-o','MarkerFaceColor','b'); hold on plot([0,0],[0,5],':b'); plot([10,10],[0,-3],':b');hold off ...

대략 3년 전 | 0

| 수락됨

답변 있음
Using a class as a function handle
Your definition of g does not make use of the input x. Was it supposed to be defined as below? g = @(x) analiseSismica(sb(x),s...

대략 3년 전 | 0

| 수락됨

답변 있음
Make two vectors equal with zero inserted in the missed location values of the small vector
V1=[1,2,3,4,1,2,3,4]; V2=[1,2,4,1,3,4]; n1=length(V1); for i=1:n1 if i>length(V2) V2(end+1:n1)=0;...

대략 3년 전 | 0

| 수락됨

답변 있음
Convex set: Finding the A and b matrices from Ax=b when the points of the convex set is known.
If you only need to address the 2D case, then you can use this: function [A,b]=vert2ineq2D(a) %Finds the expression of a 2D co...

대략 3년 전 | 0

답변 있음
error while running graph=layerGraph(net)
Like I said, your 'net' is not one fo the types listed in the error message: net = googlenet('Weights','none'); net = La...

대략 3년 전 | 0

답변 있음
set first derivative equal to zero with some constant
should I put it a number rather than a alphabet symbol to get proper result? You should just use fzero The symbolic solutions f...

대략 3년 전 | 0

답변 있음
Common legend and axes using tiled layout
One way you can do it is with nested tiled layouts: TL=tiledlayout(5,1); %Outer layout t=tiledlayout(TL,2,2); %Inner layou...

대략 3년 전 | 1

더 보기