Beantwortet
Error in multi-screen
Most of the messages are just informations. The actual error is: Error in posner_forpilotingerps_June32022 (line 50) fixation ...

etwa 4 Jahre vor | 0

Beantwortet
how to modify the variables for changing FOR loop to PARFOR loop??
What is the bottleneck of your code? Use the profiler to find it. If it is the water() command, parallelize this command: lArra...

etwa 4 Jahre vor | 0

Beantwortet
How to downsample the 3D matrix in matlab??
X = rand(1500, 1500, 1700); % 28.5 GB - does not run in the forum! Y = reshape(X, 2, 750, 2, 750, 2, 850); Z = squeeze(sum(Y...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
I AM WRITTINF THIS CODE AND GETTING THE FOLLOWING WARNING
Check this again: which image -all Is there a user-defined function in the list? If not, clear all should solve the problem a...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Changing elements of row after certain element of m*n matrix
x = [-1, -0.65, -0.45, 0, 0.3, 0.8, 1, 0.4, 0.2, -0.1; -1, -0.65, -0.45, 0, 0.3, 0.8, 0.9, 1, 0.2, -0.1]; idx = ...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Find the value of r such that the determinant of A is zero.
Remember, that Matlab uses IEEE754 doubles with limited precision. Then -5.5511e-17 is almost 0. The result is correct. See: ht...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
startup script for whole team
I use a tool to syncronize a function, which is updated by others in this forum: https://www.mathworks.com/matlabcentral/answers...

etwa 4 Jahre vor | 0

Beantwortet
create function in loop
Simplify F_sum4 = 0; start=1; stop=810; for n = start:stop F_sum4 = F_sum4 + F(:,:,n) CY_sum4 = mean(cy_sum(start:...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
I can't open and uninstall due to the error, how to resolve it?
The message suggest to re-install Matlab. So do this: install it over the existing version.

etwa 4 Jahre vor | 0

Beantwortet
Read the original output variable of function
This is impossible. If the code is not visible for the user, the names of the variables are not visible also. But remember, that...

etwa 4 Jahre vor | 0

Beantwortet
How can I use the ( nchoosek ) for this case nchoosek(x,y) where x=[1:1:80] , and y=64;
80 over 64 is 26'958'221'130'508'525. Then nchoosek(1:80, 64) needs 26958221130508525 * 64 * 8 Bytes in the RAM, which is 1,38 P...

etwa 4 Jahre vor | 1

Beantwortet
Decimal and very small values returning zeros
No, Matlab uses the standard IEEE754 conventions and has no rounding errors. The question is funny: A huge number of scientists...

etwa 4 Jahre vor | 0

Beantwortet
vectorize nested loops interpolation
% Your code: a_min = 1e-10; a_max = 1; na = 200; a_grid = linspace(a_min,a_max,na)'; Nsim = 10000; % Desired value is la...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Plot one data set with two different units?
This is a lot of information and code, which has no relation to the actual problem. What exactly is the detail you want to chang...

etwa 4 Jahre vor | 0

Beantwortet
Is it possible to set a vector as an users input'
Such inputs are obtained using a GUI usually. The callbacks of the edit fields control the type of the input. A loop would be e...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Why are xlsread (and readtable) doing such a poor job at loading mixed data files?
The automatic detection of string types is known to be a source of severe bugs. The genes "Dec1", "SEPT1" and "MARCH1" have been...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
How to skip NaN arrays outputs of a for loop?
doBreak = false; for Nj2 = 1:cj2 for Mj2 = 1:rj2 J2= j2(Mj2,Nj2); e3=(exp(C1_p).*hermiteH(M-M2...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Is it possible to denormalize data created via the 'units', 'normalized' handles? /where does the handle get it's inputs from?
About the reverse of the normalize() function: This is impossible. See: X = 1:5; normalize(X) normalize(X + 1) After the nor...

etwa 4 Jahre vor | 0

Beantwortet
My mex file is slower than my original matlab equivalent
Just some experiments. You can gain some clarity, but hardly improve the speed with this simplifications. I've tried a loop vers...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
not enough input arguments, odes
See: Answers: Anonymous function to provide parameters k1 = rand; k2 = 18; etc = 21.7; ... and so on [t,x] = ode45(@(t,x) o...

etwa 4 Jahre vor | 0

Beantwortet
Using cellfun to pull information
cellfun works on cell arrays, as the name says. You are working with tables. So this command does not match at all. Color1 = ["...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
Converting a vector of structs to just one struct (vectorizing)
X = cat(1, S(:).FieldName); % Or shorter: X = cat(1, S.FieldName); % Example: S(1).FieldName = [1,2,3]; S(2).FieldName = ...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
how to Enter same string in whole column?
T = table('Size', [5, 2], 'VariableTypes', {'string', 'double'}); T{:, 1} = "str"

etwa 4 Jahre vor | 0

Beantwortet
Not pausing on error in unit test
If the errors are caught by TRY/CATCH blocks, you can stop Matlab and enter the debug mode by: dbstop if caught error Type thi...

etwa 4 Jahre vor | 0

Beantwortet
Vectorization of nested loop
It is hard to improve the speed of code without having data to run the code. But start with calling interp1 once only. Q = i...

etwa 4 Jahre vor | 0

Beantwortet
How to make two for loop plots appear next to each other at the same time?
Move the code of both loops into one loop. Define the parent of the dranw objects. Example: FigH = figure; Axes1 = subplot(1,...

etwa 4 Jahre vor | 0

| akzeptiert

Beantwortet
cannot assign values to a cell during a parfor loop
Try this: fold_list = cellstr(strcat('Folder_',num2str((100:125).','%#4.d'))); % By the way: Simpler: % fold_list = sprintf...

etwa 4 Jahre vor | 1

| akzeptiert

Beantwortet
Changing elements of row after certain element
x = [-1,-0.65,-0.45,0,0.3,0.8,1,0.4,0.2,-0.1]; idx = find(x == 1, 1); if ~isempty(idx) x(idx + 1:end) = 0; end

etwa 4 Jahre vor | 1

Beantwortet
Importing data without using read functions
T = fileread(Text); C = strsplit(T, newline); Head = strsplit(C{1}, ','); Body = reshape(split(C(2:end), ','), numel(C) - 1...

etwa 4 Jahre vor | 0

Beantwortet
Conversion to cell from double is not possible.
If a variable is not defined before, the default type is double . You want to access a as a cell, so define it accordingly: a =...

etwa 4 Jahre vor | 0

| akzeptiert

Mehr laden