Answered
I want to know how to add number next to each other in a matrix.
load matrix equations = S*A(:)

5 years ago | 0

Answered
Normal vector from points in 3d space
See planarFit() in , https://www.mathworks.com/matlabcentral/fileexchange/87584-object-oriented-tools-for-fitting-conics-and-qu...

5 years ago | 0

Answered
writing matrix and vector in a script
a=x*y.'

5 years ago | 0

Answered
How to calculate sum(A .* (B * C), 'all') [Ed. actually sum(A .* log(B * C), 'all')] efficiently when A is sparse and B*C is full and large?
Yes I'm still calculating sum(A .* (log(B*C)),'all'). I would probably just break C down into a small number of chunks and loop...

5 years ago | 1

Answered
(Need Help) How to Obtain 2D Interpolation Coefficient?
If you have the Curve Fitting Toolbox, you can follow this example https://www.mathworks.com/help/curvefit/polynomial.html#d123...

5 years ago | 0

| accepted

Answered
Why did I get this error ?
Instead of peakArray = 0; you need, peakArray = cell(1,numel(fieldNames));

5 years ago | 0

| accepted

Answered
Least Absolute Value based regression
@NA In the years after this thread, I implemented minL1lin, which you can download from https://www.mathworks.com/matlabcentral...

5 years ago | 1

Answered
How can I perform large sparse matrix multiplication efficiently when one sparse matrix is block diagonal?
The typical value of K is 50. Since the third dimension is so small, it's probably worthwhile just storing the data as a length...

5 years ago | 0

Answered
How can I perform large sparse matrix multiplication efficiently when one sparse matrix is block diagonal?
With ndSparse, did you try the summl() method? It's more memory intensive, but it can also be faster. Here's what I see in a sim...

5 years ago | 1

Answered
Commenting Code inside for loop. Orientation Issue
No, but enhancement requests for this have been submitted (by me at least).

5 years ago | 1

| accepted

Answered
Custom class properties and method attributes
I don't know why it's not documented, but apparently there is a Description attribute that can be added, e.g., classdef myclass...

5 years ago | 1

| accepted

Answered
How do I get the indexes of a symmetrical logical matrix without getting repetitions of those indexes?
[I,J]=find(yourMatrix); keep=(J>=I); I=I(keep); J=J(keep);

5 years ago | 0

| accepted

Answered
calling seperate members of a vector function
There's no way to do that. You could do it if the components are held in struct form, e .g., F=@(x,y) struct('a',x-y,'b', y^2);...

5 years ago | 0

| accepted

Answered
Matlab does not find new method in class folder without "clear classes"
I don't know if it's intended or not, but my experience is that it only happens when your class is in a @-directory. If you put ...

5 years ago | 1

Answered
Finding consecutive zeros in an array. Not able to solve using diff command
Using, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetitions-in-vectors [~,~...

5 years ago | 0

Answered
Solve equation with multiple values for V
Because there is no analytical solution. Try vpasolve() or fzero() instead.

5 years ago | 0

Answered
Help. Plot graph calculation
You mean, how to plot the triangle? You can do, x=linspace(0,3,1000); y=(1-abs(x-1)); y=y.*(y>=0); plot(x,y)

5 years ago | 0

Answered
Intensity Profile of a specific line
You could just use improfile() https://www.mathworks.com/help/images/ref/improfile.html

5 years ago | 0

| accepted

Answered
Multiple plots on the same graph
I think the line where you plot is supposed to look like, semilogx(tc,PDF); but the code you've posted contains no variable c...

5 years ago | 0

| accepted

Answered
How to create a custom Matrix following a set of parameters
n=5; A=-diff(eye(n+2),2,1); A(:,1)=[]

5 years ago | 0

Answered
How to create a custom Matrix following a set of parameters
n=5; c=[2,-1,zeros(1,n-2)]; r=[c,0]; A=toeplitz(c,r)

5 years ago | 0

| accepted

Answered
How to covert a 1D vector to 2D matrix with overlapping effectively?
X=randi(30, 1,14); segment_size = 4; overlap_rate = 0.5; d=segment_size*overlap_rate; idx=(1:segment_size)'+ ( 0:d:(num...

5 years ago | 0

| accepted

Answered
Plot elements of specific size
You could probably use a listener to increase the MarkerSize etc as a response to zooming in or out. The code below is an imple...

5 years ago | 1

Answered
Plot elements of specific size
First, I don't care about interactive zooming. I'd like to save a pdf. If the zooming is happening only after the pdf conversio...

5 years ago | 0

| accepted

Answered
how to write a function which converts graphs from linear scale to logarithmic scale and plot them both?
To convert the scale of an existing graph from linear to log, you can do, set(gca,'YScale','log') set(gca,'XScale','log')

5 years ago | 0

| accepted

Answered
Cropping the same roipoly for multiple images
I don't understand what you mean by "cropping" an image to a non-rectangular region. An image, cropped or otherwise, is an inher...

5 years ago | 0

| accepted

Answered
Calculating value of function in point
f=@(x)2*x+2.^x; test = evaluate(f,0,6,7) function matrix = evaluate(f,x,y,n) a = linspace(x,y,n); b = f(a); matrix = [a;b...

5 years ago | 0

Load more