Risposto
Why has the locale changed in R2022a?
I find this in the release notes of R2022a: External Language Interfaces MEX Functions: UTF-8 system encoding on Windows platf...

oltre 3 anni fa | 2

| accettato

Risposto
How do i check if elements from my rows of vector are within range of one another
With some bold guessing of what you want to achieve: X = [ 0.2734, 0.1734; ... -0.1671, -0.2671; ... 0.0753, 0.0...

oltre 3 anni fa | 0

| accettato

Risposto
How to concatenate columns of varying lengths, generated by a for loop, into a matrix?
Maybe all you need is: Node_CONC = nan(200000,num_sim); THETA_ObsNode = nan(200000,num_sim); FLUX_ObsNode = nan(200000,n...

oltre 3 anni fa | 0

| accettato

Risposto
How can I down-sample the large matrix size in constant period of times?
The distance between 1 and 30 is 29, while it is 30 from 30 to 60. I you want the elements 1, 31, 61, ... use: Y = X(1:30:end)

oltre 3 anni fa | 0

| accettato

Risposto
Name a variable using an already existing variable
Creating names of variables dynamically is one of the question, asked most frequently by beginners in this forum. The experts gi...

oltre 3 anni fa | 1

| accettato

Risposto
UIPUTFILE Documentation Innaccurate/Change Warning Dialog?
I agree, that the text of the documentation is misleading. "Select a file to append or choose a new file" does not match the pu...

oltre 3 anni fa | 0

Risposto
Struct information string extraction
[] concatenates the CHAR vectors to one big CHAR vector and the result is expected. If you want a cell string, use curly braces:...

oltre 3 anni fa | 0

| accettato

Risposto
Freqz Command Resulting in Position 1 Invalid Index
The problem is mentioned in the error message already: "'freqz' appears to be both a function and a variable. If this is unint...

oltre 3 anni fa | 0

Risposto
Need help creating a matrix with unknown amount of rows.
The error message is clear: The variable "c" is not defined. Maybe "hyp" is the wanted variable? Please post code as text, beca...

oltre 3 anni fa | 0

| accettato

Risposto
Find automatically data of interest
Some methods are "ugly": load 'conv_ageing_atm5_m60p80_01to2048s_bif_74165.txt' Loading data directly into the workspace creat...

oltre 3 anni fa | 0

Risposto
Questions about infinity in matlab
Welcome to the world of the IEEE754 floating point format. This is not used only in Matlab, but in many other programming langua...

oltre 3 anni fa | 1

| accettato

Risposto
Max-min of a matrix column over rows where other columns have given values
In addition to my comment: max(x)-min(x) expressed as range(x): Nrows = size(A, 1); Npars = 9; Nouts = 11; effect = zeros...

oltre 3 anni fa | 1

| accettato

Risposto
Profile Total time vs timeit
The profiler disables (at least parts of) the JIT, the just in time optimization. This happens, because the JIT can reorder comm...

oltre 3 anni fa | 0

Risposto
While loop does not give me back the value
for h = 1:length(framesToRead) i=1; while i<length(h) The while loop is not entered. h is a scalar, so length...

oltre 3 anni fa | 0

Risposto
fprintf modifying txt file in the wrong way
You can replace: f_fil=fopen('material.inp'); s=fscanf(f_fil,'%c'); fclose(f_fil); by s = fileread('material.inp'); readli...

oltre 3 anni fa | 0

Risposto
how to use eval function in order to get the value of variable with fieldname ?
Why do you want to do this by the evil eval? See: TUTORIAL: how and why to avoid Eval . Beginners tend to try to solve problems ...

oltre 3 anni fa | 1

| accettato

Risposto
Calculate the orbit of the earth and moon around the sun using ODE45
Append an initial location and velocity for the moon also to yzero. The forces acting on the moon are the sum of the force from...

oltre 3 anni fa | 0

Risposto
Where can I find my MATLAB executeable files if I installed it to /home/Documents?
This seems to match your problem: https://www.mathworks.com/help/matlab/matlab_env/start-matlab-on-linux-platforms.html If yo...

oltre 3 anni fa | 0

Risposto
Can somebody show me how to fix these errors I am getting in my script?
You define the function as a CHAR vector. In the function root_myroot() you try to evaluate this vector as a function. But becau...

oltre 3 anni fa | 0

Risposto
How to call one of the outputs of the function?
[phi_ave_x, phi_ave_y, phi_ave_z] = crk4_aee321_Lorentz(xi,yi,zi,dt); disp(phi_ave_y) This uses the 2nd output phi_ave_y as in...

oltre 3 anni fa | 0

Risposto
I want to get an input number (N) and create as man as input number (N) empty different named matrixs. How to do such a thing?
N = input(); m = cell(1, N); Now use m{1} instead of m1. This is easier and faster. Creating variables dynamically is the que...

oltre 3 anni fa | 1

| accettato

Risposto
Delete rows from cell array in a for loop
C = num2cell(magic(4)); n = height(C) for k = 1:n C2 = C; C2(k, :) = []; ... your calculations come here end ...

oltre 3 anni fa | 0

| accettato

Risposto
Click button uifigure callback function
This looks strange. I do not see the reason for the error. Is this really the complete error message? Use the debugger to check...

oltre 3 anni fa | 0

| accettato

Risposto
GUI app callback functions problem
I'm not sure if I understand, where in the code the problem occurs. Waiting for a figure to be closed is done by the waitfor fun...

oltre 3 anni fa | 1

| accettato

Risposto
Find the desired row in the matrix
While removing multiple rows is easy using the unique(x, 'rows'), I did not find a built-in functions to identify the vectors, w...

oltre 3 anni fa | 1

| accettato

Risposto
sort each row of a vector according to its value
You do not need a function, because this is staight indexing: a = [1 3 10 5]'; b(a) = a b must be undefined or empty before t...

oltre 3 anni fa | 1

| accettato

Risposto
Solve the ODE using ODE45 and plot the response for the initial conditions
If you call a function "ode45", it depends on where its folder is located in Matlab's path, if it is used or the original ODE45 ...

oltre 3 anni fa | 0

Risposto
Please ask the code
You overwrite the value of m multiple times: m=3; m=0.1; m = linspace(0,0.001); Because projfun is a nested function, it use...

oltre 3 anni fa | 0

Risposto
Ignore rows in cell with no delimiters
You want the output: B = {a1} {1} {a2} {2} {a3} {3} {a4} {a5} {a6} {6} This is not possible. A cell matrix is still a m...

oltre 3 anni fa | 0

Risposto
How to create for and if loops instead of while
WHILE and FOR loops are equivalent: k = 1; while k <= 100 ... k = k + 1; end and for k = 1:100 ... end

oltre 3 anni fa | 0

| accettato

Carica altro