Réponse apportée
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 ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 0

| A accepté

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...

environ 5 ans il y a | 3 réponses | 0

3

réponses

Réponse apportée
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 = ...

environ 5 ans il y a | 0

Réponse apportée
how can i make this animation faster in MATLAB?
"[...] to make a ball bounce back and forth between to walls" This is as fast as it gets - I think (with m-code) %% x=1;y=1; ...

environ 5 ans il y a | 0

Réponse apportée
Resampling two signals to the same frequency
Comments The letter "A" as the name of the variable, which holds the force data, is a poor choice. There is half a second mor...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Find index of points between two points?
>> A =[1,2,5,8,4,7,6,3,12]; >> Y_min=5; >> Y_max=7; >> idx = find((A>Y_min) & (A<Y_max)); >> idx idx = 7 See L...

environ 5 ans il y a | 1

Réponse apportée
Comparing elements in a vector
"My idea is to start of squaring the elements in x and then to check if any element in x equals any element in sqr." That's a g...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Why Matlab becomes 100 time slower using vector?
I've edited my answer, chosen better names rerun the tests deleted a profiler result, which I cannot reproduce. I don't kn...

environ 5 ans il y a | 1

Réponse apportée
convert time in seconds after midnight to a certain interval
The script %% obj = duration( 0, 0, 2*3600+7*60 ); obj - mod( obj, minutes(5) ) outputs ans = duration 02:05:00 >>...

environ 5 ans il y a | 0

Réponse apportée
Unrecognized function or variable 'x'
"Unrecognized function or variable 'get_image_center'." Replace im_cntr = get_image_center(im); by im_cntr = self.get_image_...

environ 5 ans il y a | 0

Réponse apportée
Date array to timestamp
Doc says: "The datenum function creates a numeric array that represents each point in time as the number of days from January 0,...

plus de 5 ans il y a | 0

Réponse apportée
Trying to access variables that aren't available in Workspace
No, (not documented anyway) with the exception of evalin, Evaluate MATLAB expression in specified workspace and see TUTORIAL...

plus de 5 ans il y a | 0

Réponse apportée
How to convert a log file into a list of strings?
OP writes in his first comment: "I needed a code which will make the log files in the notepad like this:" My interpretation is ...

plus de 5 ans il y a | 1

Réponse apportée
Store different data types efficiently
Three solutions are mentioned in the comments of you question. I assume you have a collection of m-functions, which operate on t...

plus de 5 ans il y a | 3

| A accepté

Réponse apportée
Variable in a for loop
"[...] they both display the modified x value" No they don't. This script %% for jj = 1:100 x = 1:12; y = x; ...

plus de 5 ans il y a | 0

Réponse apportée
how I will check the Conditional statement task?
With a different interpretation of the word "check" Modify the script %% t = 1; if mod(t,2)==1 disp('[task 1]') else ...

plus de 5 ans il y a | 0

Réponse apportée
How do I add a new element to an object array using pass by reference?
The documentation on Initialize Arrays of Handle Objects says "[...] Creates unique handles for each element in the array." I a...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to read .enf file
A little exercise with regular expression >> cssm( 'BFND_W6.txt' ) ans = struct with fields: FP1: 'Invalid' FP...

plus de 5 ans il y a | 0

Réponse apportée
Read file with non-uniform lines?
>> S = cssm( 'd:\m\cssm\cssm.txt' ) S = 1×2 struct array with fields: header colhead Code data >> S(1)...

plus de 5 ans il y a | 0

Réponse apportée
Remove first characters from a string
... or if I understand "I want to remove the first 5 characters from each of these strings" literally %% u{1,1} = "ART1/TEACH...

plus de 5 ans il y a | 1

Réponse apportée
Seeking a little clarification on using sprintf with %d and formatSpec etc. to load similar *.MAT filenames that only differ in name by number.
Less brute sad = dir( fullfile( root_folder, '**', 'Band*Hz.mat') ); However, this assumes that you want to read all files und...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How do I make my vector length even?
The statement x = linspace(5,(-2*pi),(2*pi)); looks strange to me. On R2018b it creates a row vector of length 6, which supris...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Functions within a matrix
There are several ways, one of which is cat, Concatenate arrays

plus de 5 ans il y a | 0

Réponse apportée
My for loop is running only once
"My for loop is running only once" Your loop is running 361 times, but the results of each run overwrites the results of the pr...

plus de 5 ans il y a | 1

Réponse apportée
Index exceeds the number of array elements (1). Error coming in the code below
I cannot reproduce (on R2018b) the error that you report: Index exceeds the number of array elements (1). Error in CircleFitBy...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Index exceeds the number of array elements (2). Error (line 41)
dy_v is a row vector with length two dy_v= [0.33 -1.5]; The end value, n+1, of this loop is 4 %% Create Vector B for i=1:...

plus de 5 ans il y a | 0

Réponse apportée
Create index between values
Study this %% a = [0,1,0,2,0,2,1]; ixb = find( a==1, 1,'first'); % begin ixe = find( a==2, 1,'last'); % end %% b = zeros(...

plus de 5 ans il y a | 0

| A accepté

Question


Help me read the doc on matlab.fonts Settings
Background I use the font, Inconsolata, in the Command Window and the Editor. It's very readable (imo), however there is a pro...

plus de 5 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Array instead of one value in loop form
I assume that you want to iterate over the loop for the 27 values, i=[1,2,3,...,27]. That is exactly what for i=1:27 does. (The...

plus de 5 ans il y a | 0

| A accepté

Charger plus