Réponse apportée
interp3 problem: the value of the last sampling coordinate is not match.
"Any insights or suggestions on how to correctly interpolate the profile between p1 and p2 would be greatly appreciated." You a...

plus de 2 ans il y a | 1

Réponse apportée
Updating Structure Input for Functions
Do not use nested structures. Definitely do NOT use lots of variables each named after a fruit! Ugh, no. Use a structure array...

plus de 2 ans il y a | 3

| A accepté

Réponse apportée
Function returns different outputs with same inputs
The difference is very simple: Here you return FOUR output arguments from your function call: [e0_, e1_, e2_, e3_] = rotations...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
matlab 'unique' is skipping rows with data
The basic problem is that your file is large, and by default READTABLE checks a limited number of rows** before deciding what da...

plus de 2 ans il y a | 1

Réponse apportée
Passing functions with fixed input
The MATLAB documentation covers this here: https://www.mathworks.com/help/matlab/math/parameterizing-functions.html See also: ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
How to fix my attempt to vectorize counts of strings and regexpPatterns in a text file?
SearchTerms = {... 'Term_1', 'Blanket';... 'Term_2', 'blah';... 'Term_3', 'of';... 'Term_4', '(dat|not)\d{1}...

plus de 2 ans il y a | 2

| A accepté

Réponse apportée
Localize the third vector position using regexp
txt = fileread('test.txt') rgx = '(?<=Field(\S+\s+){3})\S+'; out = regexp(txt,rgx,'once','match')

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Can you change 0^0=1 to 0^0=0 in Matlab?
b = 0; n = 0; v = b^n v(isequal(0,b,n)) = 0 https://en.wikipedia.org/wiki/Zero_to_the_power_of_zero

plus de 2 ans il y a | 2

Réponse apportée
how view the content cell array
C = {' fdfd(fg,54)'}; Some steps to remove nesting of cell arrays at the output: The cell array is superfluous so index into i...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Quickest way for alternate indexing a vector
u = [5,7,11,13,17,19,23,25,29,31,35,37,41,43,47,49,53,55] v = 5:2:55; v(3:3:end) = []

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
extract word before and after character
C = {'input: pilo(52),iko(54)'; 'input:iko(54)'; 'input:pilo(52),iko(54)'; 'input:pilo(52),iko(54),op(23)'} X = regexp(C,'(\w+)...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Accessing all fields within a struct level at once
"Is this possible to achieve without implementing a loop?" Not really, but you can hide the loop using STRUCTFUN: A.one.includ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
How can I convert variable size cell structure to column or row data?
C = load('RawCellData.mat').ForbBlocks D = load('DesiredColumn.mat').DesiredRow C(cellfun(@isempty,C)) = {{[]}}; E = vertcat(...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Convert datetime to datestr without losing milisecond data
"I tried to set the variable type as 'string' to solve the below problem" The best way to import Excel serial date numbers is a...

plus de 2 ans il y a | 1

Réponse apportée
Searching a string on a table to get time
"I still have the same issue about searching into all the Comment columns." The MATLAB documentation explains that you can use ...

plus de 2 ans il y a | 0

Réponse apportée
Why are my variables saving only Nan entries?
Cal.data_Txx = ((E) ./ (1 - Cal.data_nu.^2)) .* (Cal.data_epsilon_1 + Cal.data_nu .* Cal.data_epsilon_2); Cal.data_Tyy = ((E) ....

presque 3 ans il y a | 0

Réponse apportée
Split array into groups of close numbers
a = [1,2,3,10,11]; n = 2; x = kmeans(a(:),n) c = accumarray(x,a(:),[],@(a){a})

presque 3 ans il y a | 0

| A accepté

Réponse apportée
convert a cell (Rx1 cell) to a vector (Rx1 double)
"but it is not clear to me why it transforms 270x1 cell into a vector 257x1 double" It is easy to check your data (you have bee...

presque 3 ans il y a | 1

Réponse apportée
Loading files by replacing some part of the name with a variable
Do NOT name each variable dynamically. Unless you want to force yourself into writing slow, complex, inefficient, insecure, obfu...

presque 3 ans il y a | 0

Réponse apportée
Array of ASCII Characters to String
Forget about loops and doing everything one-at-a-time as if MATLAB was some poor low-level language. Think in terms of arrays a...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
error using the function 'splitapply'
S = load('matrix_out_12.mat') % LOAD is better than IMPORTDATA max_matrix_out = max(S.matrix_out(:,2)); max_matrix_out_r = flo...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
how to know first element in Data struct
arrayfun(@(s)s.data(1),Sis)

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Convert matrix from 3d to 4d?
Where M is your array: N = permute(M,[1,2,4,3])

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Readtable importing variables from wrong sheet
ImpOpts = detectImportOptions(FullPath, "Sheet",2); ImpOpts.PreserveVariableNames = true; MeasData = readtable(FullPath, ImpO...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
Fields of Struct are not changing with functions
" even i am calling the app struct inside the functions and I am changing the fields of frame and max range, the actual app.fram...

presque 3 ans il y a | 0

| A accepté

Réponse apportée
How can I compress a table
"How can I compress them so that al of the data of one year is stored in one row. (as in the picture below?" Your screenshot sh...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
How can I merge two arrays in adjacent cells?.
X = [1,2,3]; Y = [4,5,6]; C = arrayfun(@horzcat,X,Y, 'uni',0)

presque 3 ans il y a | 0

Réponse apportée
How to reshape data in 4-D array correctly?
You can use PERMUTE like this: v = 1:16; z = permute(reshape(v,[2,2,2,2]),[4,3,2,1]); z(1,1,1,1) z(1,1,1,2) z(1,1,2,1)

presque 3 ans il y a | 0

Réponse apportée
Why does Readtable return NaN for values greater than 1000?
Ugh, double-quoting number values really is an abuse of CSV norms. Note that is not possible to simply remove/ignore the double ...

presque 3 ans il y a | 1

| A accepté

Réponse apportée
i have a erorr with echo when i use soundsc command
MATLAB has a function named ECHO, which has no output arguments: https://www.mathworks.com/help/matlab/ref/echo.html This is w...

presque 3 ans il y a | 0

Charger plus