Réponse apportée
How to find a vector multiple times in an array?
A = [1 3 4] %x,y,z-coordinates - vector B = [2 3 4; 1 3 4; 5 5 6; 3 4 6; 1 3 4]; %array find(all(A==B, 2)) % 2 is for row...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Is there any way to access a variable whose name is expressed by another string variable?
myvar = 10; string_myvar = "myvar2"; assignin('base', string_myvar, myvar); myvar2

presque 5 ans il y a | 0

Réponse apportée
How can find column wise similarity of two matrix?
A=[3 1 1 2 1 3 3 2 1 1 2 1 3 2 3 2 ]; B=[ 2 1 3 3 1 2 3 1 1 1 1 2 2 2 3 3 ]; find(al...

presque 5 ans il y a | 0

Réponse apportée
How to add 2 or 3 tables in column wise ?
% for array a = randn(5,1); b = randn(5,1); c = randn(5, 1); d = randn(5,1); % 5->50 x = [a; b; c; d]

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Pre-allocate memory to zeros or NaN?
If you have skipped some data and want to omit those data later on, then the preallocation with nan is a better options. Especi...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How can I link a matrix to a menu selections.
kilometers = [2887 7277 11628 7171 11856 5132 4432 10360 5450 12193 2624 7366 10321 8203 13201 5344 5333 8308 7394 14816];...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Antilog formula in matlab
tmp = 1og10((W_TO-A)./B); W_E = 10.^(tmp); % check out the definition of invlog10; it should be 10^x

presque 5 ans il y a | 0

Réponse apportée
How to correctly plot a 6x2 grids of subplots
You can use montage which remove the gaps of subplot axes. doc montage for more details. % fileNames is the string array of im...

presque 5 ans il y a | 1

Réponse apportée
Extract magnitude response in dB using fvtool(_) or freqz(_)
fvtool visualizes filter frequency response and it has no return value. freqz returns the frequency response and has the syntax...

presque 5 ans il y a | 0

Réponse apportée
How to turn off function signatures?
Home->Preferences->Matlab->Keyboard-> Disable the function hint (in editor and command window).

presque 5 ans il y a | 0

| A accepté

Réponse apportée
giving me error when i was usin the basic program of my course files and this is also same as the tutorial program
try give an input argument to he function: rfact(2)

presque 5 ans il y a | 0

Réponse apportée
random select n elements from n arrays
nele = 100; nlist = 50; data = randn(nele, nlist); % data in the list idx = randi([1 nele], 1 ,nlist); % r...

presque 5 ans il y a | 0

Réponse apportée
Sliding window with 40 window size and 25%(10) overlap on the cell array
Version 4: % Creat some data ns = randi([10,50], 30, 1); % number of samples for 30x1 cell elements x = cell(length(ns), ...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
how to run .m file using uigetfile() in button callback
Try the following: run(fullfile(pathname, filename));

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Error on phase diagram
x=[-1:0.05:1]; y=[-1:0.05:1]; m=length(x); n=length(y); xc=zeros(m,n); yc=zeros(m,n); for i=1:m for j=1:n xc...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How to automate dimensional expansion elegantly(broadcasting mechanism)?
meanRGB = [0.485, 0.456, 0.406]; stdRGB = [0.229, 0.224, 0.225]; oriImg = imread('peppers.png'); % RGB,[0,255] range img = re...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
import over 1000 files
You may hit the limit os the number of files that can be opened simutaneously. While it possible to increase the maximum number...

presque 5 ans il y a | 0

Réponse apportée
How to calculate a printed arithmetic
str = []; for A=1:3 if A==1 str = [str sprintf('2')]; elseif A==2 str = [str sprintf('+')]; el...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Event-based script without any infinite loop
doc timer. Here is an example to display a message every 3sec for 3 times: t = timer; t.StartDelay = 3; t.TimerFcn = @(myTim...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How to make scientific notation appear next to each tick/label on axes instead of the top?
x = linspace(1e-6, 2e-6, 21); plot(x) h = gca; h.YTickLabel = string(x*1e6)+"\times10^{-6}";

presque 5 ans il y a | 0

| A accepté

Réponse apportée
How do I cut a vector from the end of a vector of a certain length and keep it in an independent vector
A=[1 2 3 4 5 6 7 8 9] cutpoint = 7; B=A(1:cutpoint) C=A(cutpoint+1:end)

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Question about exponential functions and draw plots
doc fplot for more details. a = 1; b= 2; f = @(x) exp(a*abs(x) + b); fplot(f)

presque 5 ans il y a | 0

Réponse apportée
Removing redundant rows where not every row has the same number of elements
x = ["HIST1H2BC" "K13" "HIST1H2BC" "K13;K16" "HIST1H2BC" "K16" "HIST1H2BH" "K13" "HIST1H2BH" "K13;K16" "HIST1H2BH" "K16" "...

presque 5 ans il y a | 0

Réponse apportée
Import multiple .txt files
Use "headerlines" parameter to ignore the header lines: data = textread(file_paths{i}, format, 'headerlines', headlineNum);

presque 5 ans il y a | 0

Réponse apportée
Extract the row that contains the minimum value in the last column of a matrix
A = randn(4, 5) [~, irow] = min(A(:, end)); b = A(irow, :)

presque 5 ans il y a | 1

| A accepté

Réponse apportée
How to read, reshape, and write large data?
You can read a small portion each time and write to the file. This way you will not use a lot of memory. blocksize = 1e6; nfi...

presque 5 ans il y a | 0

| A accepté

Réponse apportée
Average data from excel
fn = dir('10G*.xls'); nfiles = length(fn); ax(1) = subplot(121); hold on; ax(2) = subplot(122); svp = cell(size(fn)); ...

presque 5 ans il y a | 1

Réponse apportée
How to find the maximum value of the first column in multiple matrices?
X = rand([6,3,6]); % find maximum value of 1st column of each 6 matrices max(squeeze(X(:, 1, :)))

presque 5 ans il y a | 1

| A accepté

Réponse apportée
Applying a Bessel Filter to Acceleration Data
Do you think you really need bessel filter (for linear group delay)? Otherwise, other filter types give better attenuation/rippl...

presque 5 ans il y a | 1

| A accepté

Réponse apportée
plz help me with this task
correctpw = ["user1" "abcd12345"; "user2" "abcdefg"]; loginstatus = false; while true userna...

presque 5 ans il y a | 0

Charger plus