Beantwortet
I have been trying to fix the problem of this code but unfortunately It keep saying ERORR on line 71 which is [y= dfl(xo)\fl(xo)]. Need to help?
"Unrecognized function or variable 'dfl'." - The error message seems to be clear: The expression "dfl" is unknown. Do you expect...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to compile .mex from folders path?
@Gundeep: Prefer using absolute paths. If e.g. the folder "mexFunctions" is in the current folder, use: addpath(fullfile(cd, 'm...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Out of memory error in Matlab and How to solve it?
Of course an out-of-memory problem is solved, if more RAM is available. But if the equation is stiff, this solution is of tempor...

mehr als 3 Jahre vor | 0

Beantwortet
convert 1x20 double struct into a vector containing 20 values
With wild guessing: S.y = rand(1, 20); % Is this equivalent to your struct? plot(S.y); % Is this the way your get a ...

mehr als 3 Jahre vor | 0

Beantwortet
load a large text file and split it after a specific character
S = readlines('YourFile.txt'); ind = [find(startsWith(S, '$')); numel(S) + 1]; % [EDITED, readlines reply column vector] n ...

mehr als 3 Jahre vor | 0

Beantwortet
How to break data in to groups using while loop?
matrix = [1 50 60 70 50 40; ... 2 NaN 10 20 10 10; ... 3 NaN 20 NaN NaN NaN; ... 1 NaN 60 30 40...

mehr als 3 Jahre vor | 0

Beantwortet
Attempt to grow array along ambiguous dimension. it happens when N,M are smaller then the total of A,B. can I make my code work for any value of N,M? if so how would I do that
Some simplifications: Use numel(C) instead of length(C(:)). C(1:end) is exactly the same as C. The values to not matter the ...

mehr als 3 Jahre vor | 1

Beantwortet
my code keeps looping indefinitely and I could not figure out why, please help
No, the loops do run run infinitely. They are only slow. Check this with displaying a loop counter. Use the profile to find the...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Is it possible to display text in the console using latex expressions ?
LaTeX is not an option in the command window. Using Unicode characters works for some fonts, but fails with other font. The res...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how do i join cell array strings for plotting
Dicide to use a better input format. Either a cell string: C = {'abc\_111', 'def\_111', 'ghi\_111'; ... 'abc\_123', 'abc\...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to find the longest distance normal to line from the dataplot?
If you rotate the X and Y coordinates of the graph such that the connection between start and end point is parallel the X axis, ...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Automating length with reshaping, and using reshape to loop through data.
See reshape - simply use [] for the free dimension to be adjusted automatically: tt = reshape(t, 3, []).' Note: While ' is the...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
error described on the command window does not appear on code analyzer
The code analyzer shows typing errors and other static problems. The error message you get is a run-time problem, which occurs ...

mehr als 3 Jahre vor | 0

Beantwortet
how do i create a signal which is reset to zero every time the input signal increases of 1?
signal2 = diff(signal) == 1;

mehr als 3 Jahre vor | 1

Beantwortet
Error in running the code
dlmread cannot handle the double quotes around the numbers. Use modern import functions instead, e.g. readmatrix(). The option '...

mehr als 3 Jahre vor | 0

Beantwortet
I have a string with 10 variables created using randi, between 0 and 1, in the last 5 variables (i.e 5-10 variables) i want maximum 2 places with 1 only (eg:- 1011101001).
nVar = 10; last = 5; a = randi([0, 1], 1, nVar - last); b = zeros(1, last); n = randi([0, 2]); % 0, 1 or 2 b(rand...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to simplify too much of if
Change: if (0<S)&&(S<=10) if AggS==10 if fap==40 if fwcr==0.5 fp=39; e...

mehr als 3 Jahre vor | 0

Beantwortet
How to store values in matrix form for differn iteration
A = [6 3 4 5 2 7 1]; Collected = zeros(500, 7); for k = 1:500 A = rem(A + randi([0, 100], 1, 7), 10); % A random test fu...

mehr als 3 Jahre vor | 1

Beantwortet
How to find number of bit change between binary numbers?
Step 1: Convert your input to a typical binary representation as a numerical vector [1,1,0] or char vector '110'. Step 2: XOR ...

mehr als 3 Jahre vor | 1

Beantwortet
Find doesn't seem to work with Matrix larger than 127x127
This observation does not match the facts: X = randi([0, 1], 150, 150); [i,j] = find(X); max(i) max(j) If you observe a ver...

mehr als 3 Jahre vor | 0

Beantwortet
interp2 from 6x6 map to 500x500 map
Of course, 1*(0:1/N_mesh:1) has N_mesh+1 points. "But the image is not centered at the extremes..." - What does this mean? By ...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Get special variable out of every struct in workspace
This is a bad coding design. Creating a bunch of variables causes much troubles. See here for an exhaustive discussion: https://...

mehr als 3 Jahre vor | 1

Beantwortet
How to write this fuction in Matlab? I have an example code in Python
Assuming that b_1, b_2, r_1, r_2 are constants: % As anonymous function: r_1 = rand; % Define the constants r_2 = rand; b_1...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Why does my uicontextmenu only show after a pause/breakpoint?
Try to replace pause by drawnow. This allows the GUI to activate the updated properties. If this is working also, this is the ex...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Why do i get error when i reupload the GUI that i deleted before.
The solution is explained in the message clearly already: "Contact the File exchage If you want to upload the file again". Searc...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how to add header for new output file?
You want to copy the header? Read the first 15 lines and write it: [fid, msg] = fopen(file_paths{i}, 'r'); assert(fid > 0, msg...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
i want the loop to run only one time, it keeps running until it subtract 84 instead of 6
Remember that length(A) replies the longest dimension. Maybe you meant height(A). Even if this replies the same value for the ex...

mehr als 3 Jahre vor | 0

Beantwortet
Unexpected high memory usage in MATLAB.
Avoid clear all, because it has no benefits. It removes all loaded functions from the RAM and reloads them from the slow disk th...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Escaped character '\U' is not valid. See 'doc sprintf' for supported special support.
It is a typical bug under Windows, which does not occur, when the software is tested successfully in Linux: fprintf(['Current f...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Detect if user has a valid MatLab license
The detection is not trivial. A matching license file might be there, but the license can be expired. The computer or license se...

mehr als 3 Jahre vor | 0

Mehr laden