Beantwortet
How to save .fig Figure Background Color As Well As Saved Pict Format?
You can set this property during the creation of the figure: figure('InvertHardcopy', 'off'); Or dynamically later: set(gcf, ...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Outputting information from a loop
What about: D = cat(2, Table2{:});

mehr als 4 Jahre vor | 0

Beantwortet
Normalized Sinc using matrix inputs
What about appending: y(isnan(y)) = 1;

mehr als 4 Jahre vor | 0

Beantwortet
Plot cummulative values without creating a cumulative vector with the values
This cannot work. To get the y value of the line, you do have to perform a cumulative sum. There is no chance to avoid this calc...

mehr als 4 Jahre vor | 0

Beantwortet
What am I doing wrong when returning the value from the function to my loop?
% C++: % while (int sent = dfs(s, t, INF)) sent = dfs(s, t, INF); while sent ~= 0 sent = dfs(s, t, Inf); end And: %...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to specify Hexadecimal Color Code on a fit line?
This is working in modern Matlab versions: plot(1:10, rand(1, 10), 'Color', '#A2142F') For older versions: color = uint8(ssca...

mehr als 4 Jahre vor | 1

Beantwortet
i am getting an error in the following code ca some help to rectify ?
The code runs in the forum also, at least until: xlable('x-axis'); ylable('y-axis'); The commands are called "xlabel" and "yl...

mehr als 4 Jahre vor | 0

Beantwortet
datetime InputFormat error in R2021b
I guess, that you have defined "datetime" as a variable by accident. datetime = timerange('12/18/2015 08:00:00', '12/18/2015 12...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
Only Save the New Numerical Data to Text File
If you do not close a file opened by fopen with fclose is stays open. Solution: Append an fclose(fileid) after the fprintf.

mehr als 4 Jahre vor | 0

Beantwortet
while loop for conditional statement
Maybe: array_data=33 x 1 % double window_size=10; m_BW=0.5; var_BW=0.5; i = 1; fin = window_size; while i <= fin m_B...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I assign values to a Structure with multiple subfields with one line of code?
You mention "as simple as possible". Then avoid unneeded operators e.g. by replaing: CellArr = {[1,2,3,4], [1:10], ['Man of Num...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
How can I speed up image manipulation of a .fig?
Maybe. How is your OpenGL driver set up? opengl info Which Shading and Renderer in used in the figure? Can you provide the fi...

mehr als 4 Jahre vor | 0

Beantwortet
For large arrays, Matrix rows carry onto next line theyre written in from a fortran program
Storing large blocks of data as source code is a bad idea. Text or binary files are much better. Matlab tries to be smart and l...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to do manipulation with decimal numbers in array
This cannot work reliably. Remember, that most decimal numbers cannot be represented exactly in binary format. Therefor some num...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
a run function gives an error due to size
Maybe: resultt = nan(10, 10); for bi = 1:10 r = birfazson(1, birfazson(2,:) == 1); if ~isempty(r) resultt(bi...

mehr als 4 Jahre vor | 0

Beantwortet
Can I comment only a section or part of a line?
No, this is not possible in Matlab. It would be dangerous also, because it could move some code on the right side of the line o...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
colon operator bug?
The colon operator works as expected. For integer values it does reply integers. But be aware of rounding effects for floating p...

mehr als 4 Jahre vor | 1

Beantwortet
Loop through data-struct and its sub-structs; Trouble with 'indexing' - error
You want to use "dynamic field names". Then the field name must be included in parentheses: x = DATA.(fn{N}).second-field.colum...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Anonymous function arguments and parameters extrction
pu = @(x, y) [x,y]; a = pu(1, 2:3) b = pu(1:2, 3) isequal(a, b) This means: No, you cannot decide, what the inputs have be...

mehr als 4 Jahre vor | 0

Beantwortet
Differentiate different matlab instances opened in GUI
You can use FEX: CmdWinTool . If you want to set the title of Matlab's command windows from inside the startup function, you ha...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
how do i print this matrix?
Join the lines for k=10:10:160 to for k=10:10:160

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Out of memory only on Mac
Working with "int" causes problems, when some compiler uses 32 bit integers and the other 64 bit integers. mxCreateNumericArray...

mehr als 4 Jahre vor | 0

Beantwortet
Read csv in multiple directories in a loop
files = dir(fullfile(msFolder, '**', 'rawdata.csv')); % Search recursively n = numel(files); data = cell(1, n); frequenc...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Change resize algorithm in figure window
If you mean, how image() resizes the data to match the pixels of the display, see: https://www.mathworks.com/matlabcentral/answe...

mehr als 4 Jahre vor | 0

Beantwortet
Why does not Matlab language support function/operator chaining?
Matlab does not support this, because it has not been implemented yet. Sorry. The answer is trivial. I'm using Matlab to solve...

mehr als 4 Jahre vor | 0

Beantwortet
How to correct my code?
I did not understand, what you are asking for (see my comment). but this piece of the code looks suspicious: A=(H(x)/a(k))-...

mehr als 4 Jahre vor | 1

| akzeptiert

Beantwortet
why it will go wrong using 'cell'?
I confirm, that this is an inconsistent behavior. a = {[], []}; b = cell(1, 2); isequal(a, b) a{1}([]) = [] % Working: Not...

mehr als 4 Jahre vor | 0

| akzeptiert

Beantwortet
Defining a mathematical function as the summation of multiple functions
Why do you want to create the function symbolically? It is easy to define it directly: ht = @(u1, u2, u3, u4) sum((xdata(:, 1) ...

mehr als 4 Jahre vor | 0

Beantwortet
Error when executing an existing code
Error: File: Untitled27.m Line: 1380 Column: 3 Unexpected MATLAB operator. (referent to: "function ret=arc2(r1,r2,h,phi)") At...

mehr als 4 Jahre vor | 0

Beantwortet
How do I create an element wise if-else code, and apply equations to inputs that meet certain criteria?
"Elementwise" does either mean a loop: for k = 1:numel(sigma) Y = log10(28300 * sigma(k) / Eya); ... end Or you use...

mehr als 4 Jahre vor | 0

Mehr laden