Answered
Is it possible to get axis size in px units if it is created in normalized units?
set(gcf, 'units', 'normalized', 'position', [0 0 1 1]); AxesH = axes('units', 'normalized', 'position', [0 0 1 1]); dr...

8 years ago | 4

| accepted

Answered
Wrong result when calling CBLAS dgemv function in a mex file
This does not answer your question directly, but this is a C-Mex function to call DGEMM and DGEMV: #include "mex.h" ...

8 years ago | 0

Question


Delay in the forum
How long does it take until you can see a given answer in the forum? In the last few months it has happened repeatedly to me,...

8 years ago | 1 answer | 0

1

answer

Answered
i need a nested for loop
A "nested for loop" is accurate enough to start: n = 5: for i1 = 1:n for i2 = ??? ... end end Now...

8 years ago | 0

Answered
why the square wave is just a line?
The problem is here: s(-2.75 <= t < -0.25) = 1; s(-0.25 <= t < 2.25) = -1; The condition |-2.75 <= t < -0.25| is eval...

8 years ago | 0

Answered
Can I pass a pointer to a matrix created in MATLAB to C via a MEX file and change the data in it?
This works directly, but it can have side-effects, because Matlab uses a copy-on-write strategy and shared data copies: a =...

8 years ago | 1

Answered
How can I plot non connected dots in rectangle shape?
x = [-4, -4, -4, -4:4, 4, 4, 4]; y = [ 1, 2, 3, repmat(4, 1, 9), 3, 2, 1]; plot(x, y, 'o')

8 years ago | 0

Answered
Why doesn't the MEX function call from MATLAB match the signature in the MEX file?
There is no "function signature" when you call a C-mex function, because there is none in Matlab also. Example: function [a...

8 years ago | 0

Answered
how can i increase the number of points used in viscircles?
What about trying it? edit viscircles If this is possible, do not modify the original, but create a copy under a new fil...

8 years ago | 0

| accepted

Answered
To find a value on x axis corresponding to a y value( found by interpolation) in a MATLAB plot
For each row: Result = zeros(1, 57); for iCol = 1:57 Result(iCol) = interp1(Data(iCol, :), y, 50); end where ...

8 years ago | 0

| accepted

Answered
how can i plot 5 periods of this signal
If you use |repmat| to concatenate the data 5 times, you have to concatenate the time |t| also 5 times, but add T in each block ...

8 years ago | 0

| accepted

Answered
How do I create a mat file in a loop and store a matrix generated in that newly created mat file? (i also need to save every created mat file in the loop)
sprintf('angry_%d%d.mat',j,k)=st_matrix; This cannot work. On the left you create a char vector, not a variable. In additio...

8 years ago | 0

Answered
save json file to directory from workspace
No, this is not a "wrong" encoding, but |save| stores the data in MAT file format. |sav| is simply the wrong function to store a...

8 years ago | 0

| accepted

Answered
command prompt result show in left side workspace for some specific command
X = rand(5, 5); disp(X) fprintf('%g %g %g %g %g\n', X.')

8 years ago | 0

Answered
How to change y axis label with percentage?
x = [1,2,3,4,5,6,7,8]; y = [2.8, 3.33, 4.8,2.1,2.5,0.35,3.4,1.6]; figure ax = axes; plot (x,y,'*'); set(ax, 'YT...

8 years ago | 2

| accepted

Answered
Element-wise raise an array to an integer power
What about: * <https://www.mathworks.com/matlabcentral/fileexchange/44574-elementwise-power> * <https://www.mathworks.com/ma...

8 years ago | 0

| accepted

Answered
Enter debug mode if a variable changes value
I'm still convinced that the conditional breakpoints solve your problem. Set the breakpoints automatically: function dbTest x ...

8 years ago | 0

| accepted

Answered
Enter debug mode if a variable changes value
What about <https://www.mathworks.com/help/matlab/ref/dbstop.html#buznbn3>: dbstop in myprogram at 4 if X>=3.1415 Or yo...

8 years ago | 1

Answered
number of times consecutive values occur
With <https://www.mathworks.com/matlabcentral/fileexchange/41813-runlength FEX: RunLength>: X = [1 1 1 1 0 1 1 0 1 ...

8 years ago | 0

Answered
matlab gui error using axes invalid object handle
|axes(handles.axes5)| fails, if |handles.axes5| is not a valid axes object. Where did you create and define it? Has it been dele...

8 years ago | 0

Answered
Summing up entries in the second column only when an entry in the third column is positive
index = (N(:, 3) > 0); result = sum(N(index, 2))

8 years ago | 0

| accepted

Answered
Adding Style to message box
Start with reading the documentation: <https://www.mathworks.com/help/matlab/ref/msgbox.html doc msgbox> There is no direct m...

8 years ago | 0

Answered
Why MATLAB R2017b is not opening after sucessful installation??
Uninstall Matlab and install it again. If this does not help, contact MathWorks and ask for an installation support. See the "Co...

8 years ago | 0

Answered
Import text files from multiple folders
If all files are called "fx.txt" and you are using a Matlab version >= R2016b: FileList = fullfile(yourpath, '**', 'fx.txt'...

8 years ago | 0

Answered
Loop through a vector with changing legth
A loop over the elements of a vector cannot work, if you remove elements of the vector, except if you process the elements from ...

8 years ago | 1

Answered
slider y lim multiply
set(handles.slider, 'Value',handles.minimum, ... 'Min',handles.minimum, ... ...

8 years ago | 0

| accepted

Answered
Not enough input arguments error(line 5).
Use the debugger to find the reason of the problem: <https://www.mathworks.com/help/matlab/matlab_prog/debugging-process-and-fea...

8 years ago | 0

| accepted

Answered
How can I packed equal circles with raduis R inside a rectangle L X W ??
See e.g. <https://en.wikipedia.org/wiki/Circle_packing_in_a_square> : As Stephen has said already, the problem is hard. You cann...

8 years ago | 0

Answered
Duplicating columns into a matrix
Or: B = A(ones(1,3), :) This is what happens inside |repmat| also. It has slightly less overhead, but I'd prefer |repmat...

8 years ago | 1

Answered
How do I change the fill opacity based on my x coordinates of my mouse?
function main FigH = figure; AxesH = axes; t = (1/16:1/8:1)'*2*pi; x = sin(t); y = cos(t); FillH = fill(x,...

8 years ago | 0

Load more