Answered
How to modify few numbers in a random text file?
Try this %% chr = fileread('model_v2.txt'); ffs = 'model_out.txt'; fid = fopen( ffs, 'w' ); [~] = fprintf( fid, chr, 1.2, 3...

2 månader ago | 0

Answered
How to replace elements of a cell array using a containers.Map
With string and arrayfun on R2018b %% names_to_replace = ["TonnageDeBSA", "D__bitD___eauAuBSA", ... "Pres...

2 månader ago | 0

Answered
How can I keep asking the user for correct input even after they press enter?
Use strcmpi( Ready, 'ready' ) instead of Ready== 'ready' | Ready== 'Ready' Don't use == in combination with character array...

3 månader ago | 1

Answered
How can I concatenate multiple CSV file and turn into one CSV file
A alternate idea (that wrongly(?) concatenates the the files vertically) Pro avoids converting to numerical and back to text (...

3 månader ago | 0

| accepted

Answered
Changing the values of a column in a table.
This statement does it tbl.t = tbl.t(ones(height(tbl),1)); % once refered to as "Tony's trick" Example: %% Create a sampl...

3 månader ago | 1

Answered
How to replace specific text in .csv file
Another approach, which avoids conversion to numerical and back to text. (And, I think, works with R2006 and later releases.) %...

3 månader ago | 1

| accepted

Answered
Question about accessing data in a nested struct
It is impossible (for me) to help based on the little information that you provide. Here (R2018b) it works fine. >> sas = xml_...

3 månader ago | 0

| accepted

Answered
How do I set a class property?
This might help as a start >> vec = vector; >> vec.v1 ans = 120 >> where classdef vector properties v1 ...

3 månader ago | 0

| accepted

Answered
Unknown File/Folder in directory
"What does this mean, I dont Understand." I assume that you refer to 34 and 36, respectively. Main_File is a struct array with...

3 månader ago | 0

| accepted

Answered
Select Specific NC Files in Folder Using Date Included in Filename
Something like this should do it matrix = [ 6, 4, 1980 6, 4, 1981 ]; dates = string( datestr( [matrix(:,[3,1,2...

3 månader ago | 1

Answered
clarification in for loop with intervals
Someting like this %% indicies = {[55:1:65], [125:1:145], [201:1:225]}; for jj = 1 : numel( indicies ) for kk = indicies...

3 månader ago | 0

| accepted

Answered
How to add an element to cell?
One way >> the_cell={'January','March','April'}; >> the_cell = cat( 2, the_cell(1), {'February'}, the_cell(2:end ) ) the_cell...

3 månader ago | 0

| accepted

Answered
how to change the number that decreases in the array element to the same number, for example 0 (zero)
Is something like this what you are asking for? %% a = [100.001469926008 0.0140073495254864 0.00452326089811489 ... ...

3 månader ago | 0

Answered
Why I get this error for my code?Error: File: Untitled2.m Line: 10 Column: 8
Replace x2=x1. / max(x1); by x2=x1 ./ max(x1); Be careful with where you add spaces

3 månader ago | 1

| accepted

Answered
Convert char to variable
"by means of OOP, to create an app" Object Oriented Design isn't easy and there are many different solutions to a problem. I ...

3 månader ago | 0

| accepted

Answered
Importing Data from Text File Loop
First you need to create an array of file specifications. I prefer to use the function dir() glob = fullfile( "C:\Users\nperson...

4 månader ago | 0

Answered
Extending the number of terms in a specific sequence.
A copy&paste mistake: synth_f1 = synth_f1 - (1/(n*n))*sin(n*w*t) + (1/((n+2).^2))*sin((n+2)*w*t); % ...

4 månader ago | 1

Answered
Accessing subclass methods from abstract superclass
This is not what you ask for, but close. (I don't think what you want is possible with Matlab.) >> child = ChildClass(); >> ch...

4 månader ago | 1

Answered
Best way to truncate imported data so the plot displays the area of interest
One simple interactive way (R2018b) %% some data noise = rand( 0.5e6, 1 ); roi = 4.5*sin( (1:5e3)/(20*pi) )'; data = [ noi...

4 månader ago | 0

| accepted

Answered
Import hours from a excel file
It can be done with https://se.mathworks.com/help/matlab/ref/duration.html. , but that requires more reading of the documentatio...

4 månader ago | 0

Answered
Combining Matrices into one
"I have 20 matrices" are those <68x68 double>? "matrices" implies that. If yes, try %% numfiles = 29; Ws = nan(68,68,numfi...

4 månader ago | 0

Answered
What frustrates you about MATLAB? #2
It frustrates me that else if is legal (R2018b) %% if length(c) > 1 d(end + 1,1) = 1; else if length(c) == 1 %#ok<S...

4 månader ago | 2

Answered
Creating a growing list
Add Joey = cell(0); before the loops and replace Joey = {('Bi**h Changed'),r,c} by Joey(end+1:end+3) = {('Bi**h Changed'...

4 månader ago | 0

| accepted

Answered
What frustrates you about MATLAB? #2
It frustrates me that enumeration events methods properties are not reserved keywords (in R2018b). The statement meth...

4 månader ago | 0

Answered
how, using a for loop, can I create an array
how using a for loop V and A are overwritten for every iteration of the loop. Try this vec = [.25:.25:4]; len = length( vec ...

4 månader ago | 0

| accepted

Answered
How to repeat run
Put your script in a function and call it 50 times for jj = 1 : 50 [ Ergebnis2p, Ergebnis3p ] = good_name( ); % store...

4 månader ago | 0

| accepted

Answered
Evaluating Method for multiple Objects, without using Eval
Q1: Yes (I don't understand why you thought of using eval/evalin.) Q2: ??? Q3: Yes, e.g. array of instancies of Class_2 The ...

4 månader ago | 0

| accepted

Answered
plotting in matlab using while loop
The answer ought to be, step throw the code and observe what each line of code makes to your diagram. However, the problem is t...

5 månader ago | 0

| accepted

Question


How to hinder ongoing spamming II?
For the record: Ongoing spamming from https://se.mathworks.com/matlabcentral/profile/authors/20474294 noom gmaukel franque da...

5 månader ago | 3 answers | 0

3

answers

Answered
Reference to non-existent field 'recording'.
%% clearvars a=1; b=2; X.data = 17; save( 'recording.mat' ); %% question_6 = load('recording.mat') outputs question_6 = ...

5 månader ago | 0

Load more