Beantwortet
How to compare and merge matrices with same numbers?
A =[ 1 2 3 4; ... 9 6 7 8; ... 10 5 4 7]; B = [ 8 2 3 4; ... 11 6 7 8; ... 5 5 6 7]; m = ismember(...

mehr als 3 Jahre vor | 0

Beantwortet
How to write a while loop that returns the number of the value you put in?
x = [4575, 893, 78, 12345]; y = floor(log10(x) + 1) Do you really need a loop? x = 10000; n = 0; while x >= 1 n = n + ...

mehr als 3 Jahre vor | 1

Beantwortet
3 sine waves in 1 graph, same frequency different amplitude
I've replaced your huge 38 MB BMP image by a 48 kB JPEG to improve the speed of loading the thread. Which problem do you have t...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
I want the GUI to input a result from another m file in a static text box after clicking a push button.
function msg = YourFcn(your inputs) power_difference = mean(adj_crank_power)-mean(trainer_power); if power_difference < -1 ...

mehr als 3 Jahre vor | 1

Beantwortet
assigning file from the struct
S = 'X'; A.(S) B.(S) C.(S) D.(S) This is called "dynamic field names".

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Matlab not recognizing edits to custom function
Is the a P-coded version of the function? What does which(funcname, -all) show? Maybe there is another version of the function ...

mehr als 3 Jahre vor | 0

Beantwortet
how to approximate set of point to a given function
Search in the net for "Matlab fit ellipse": https://www.mathworks.com/matlabcentral/fileexchange/3215-fit_ellipse https://www...

mehr als 3 Jahre vor | 0

Beantwortet
How to store data in a pre allocated array
Of course you overwrite the values, see: Array_Result(i,j)=2; Array_Result(i,j)=2; You canno...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
is this code correct?
The equation of an underdamped mass-spring-dashpot system is: This does neither match y = exp((-c/(2*m))*t).*(A*sin(sqrt((k/...

mehr als 3 Jahre vor | 0

Beantwortet
Below is the question and together with it is my code... but there is always error at the fscanf function.. Can anyone help me pls??
The problem is hidden here: file_id=fopen('file','r') text=fscanf('file','%s',a) % ^^^^^^ ^ ??? fscanf expect...

mehr als 3 Jahre vor | 0

Beantwortet
How to request user input to press Esc or Enter ?
This will not work. The input command is not sufficient to catch a pressed Esc key. Using the input capabilities of the command...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
here, i couldn't get the A,B,C values while using if, elseif conditions. how to get values while using conditional statement?
This cannot work: if i==2:m 2:m is a vector. You can compare i with the vector, but the == operator works elementwise. The...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Error with fopen: I saw a lot of answers saying it has to do with folder permissions, but I should have write permissions because it is a folder I created.
fopen fails to open a file for writing, if: you do not have write-permissing in this folder. You "should" have such permissions...

mehr als 3 Jahre vor | 0

Beantwortet
question regarding sum(m,3) command
Actually a sum over a 3D array along the 3rd dimension replies a [M x N x 1] array, as summing over the 2nd dimension creates a ...

mehr als 3 Jahre vor | 1

Beantwortet
I want to delete part of a row in an array but it kept returning an error
The error message tells you, that the wanted procedure is not possible in Matlab. Matrices and arrays of more dimensions must ha...

mehr als 3 Jahre vor | 0

Beantwortet
Code issue with custom imhist() function
You observe the effect of a saturated integer class: x = uint8(0); x = x + 254 x = x + 1 x = x + 1 % !!! An UINT8 cannot c...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I remove "nested/deeper" layers of a cell?
You have posted a file, which contains the cell matrix called "new_mat". It does not have any second level. Therefore you cannot...

mehr als 3 Jahre vor | 0

Beantwortet
Average across structures and fields
It was a bad idea to hide an index in the field names as in walking_01. Using an array with a real index is smarter. This is fix...

mehr als 3 Jahre vor | 0

Beantwortet
How to read/plot ".ive" file in matlab?
I assume you mean the OpenSceneGraph files. Use this tool to import the data and export them to another file format, which can b...

mehr als 3 Jahre vor | 0

Beantwortet
i just want to check it why its not working can you try it because in my friend laptop it was working pls help
s = fileread('MATLAB.txt'); words = strsplit(s); Do you see it? The code can be simplified massively. n1=0; % Just a hint: w...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How to ignore leading spaces '_' for numbers when importing a matrix from .txt
What about: M = readmatrix('data.txt', 'LeadingDelimitersRule', 'ignore');

mehr als 3 Jahre vor | 1

Beantwortet
How to input multiple values to the same variable to avoid having to keep changing the values and rerunning the program each time?
Do you get a message concering the && operators? They need scalars are inputs. If you provide vectors, use & . But then if si...

mehr als 3 Jahre vor | 0

Beantwortet
Out of memory when using ode45(@t,x)
I've copied your code without any changes (but adding en end at the bottom) and it is working: %% Initilization th_int=[-pi/2 ...

mehr als 3 Jahre vor | 0

Beantwortet
GUİ edit box setting
syms x eq = sin(x) == pi/2; sol = solve(eq); s = string(sol); set(HandleOfTheEditField, 'String', s)

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
how can i print 3 different vectors' while every vector contain different variable type?
Vectors, matrices and other arrays (except for cell array) contain elements of the same class. This is the definition of an arra...

mehr als 3 Jahre vor | 0

Beantwortet
Minkowski sum of two sets
See https://en.wikipedia.org/wiki/Minkowski_addition Guessing the type of the input: A = rand(5, 2); % "Points" as x and y c...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
What can we do with the thread "license-manager-error-9"?
That thread contains serveral useful advices. If they do not help already, contacting the support directly is the best choice. ...

mehr als 3 Jahre vor | 0

Beantwortet
Out of Memory error when resizing 3D volumes
If the resized image is stored as uint8, you need 2080 * 2080 * 2145 = 9.28 GB of free RAM. For images in double format you need...

mehr als 3 Jahre vor | 0

Beantwortet
Translate code to parallel computing
% In this lottery, 15 numbers out of 25 (1 to 25) are drawn. You can win % specific prizes if you match 11 numbers, or 12 numbe...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Please help me to give answer my 2 questions
Connecting the Matlab drive is explained here: https://www.mathworks.com/help/matlab/matlab_env/install-matlab-drive.html If ...

mehr als 3 Jahre vor | 1

| akzeptiert

Mehr laden