Réponse apportée
I have created folders using an array 1-6 and loaded the CSV file now I want to save data from CSV file to the folder in form of text file.. kindly help me
Here's an example with some dummy data. dummydata = {0, 1:9;1,11:19;2,21:29;} for k=1:size(dummydata,1) mkdir(num2str(d...

plus de 8 ans il y a | 0

Réponse apportée
If and elseif with Or
when you use | |, you should use it like, if year == 2012 || year == 2016 % and so on you need have "an expression" on b...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
For loops and figure window title
figure('Name',basename{k},'NumberTitle','off')

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to find same values in two different data sets of different sizes?
C = find(ismember(A.',B.','rows'))

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
I have matrix A =[nx1] & B = [nx1] I want to combine them into C = [ nx2]
C = [A, B] for plotting A against B, you are right, plot(A,B)

plus de 8 ans il y a | 0

Réponse apportée
How to index a matrix with existing array?
use sub2ind <https://de.mathworks.com/help/matlab/ref/sub2ind.html> [row, col] = sub2ind(size(a),b(:,1),b(:,2)) or dir...

plus de 8 ans il y a | 1

Réponse apportée
why I am getting Unbalanced or Unexpected parenthesis or bracket?
if you want to multiply two numbers, you have to use *** hoop=1/2*(SH+Sh)*(1+R^2/r^2)-1/2*(SH-Sh)*(1+3*R^4/r^4)*cos(2*a)

plus de 8 ans il y a | 0

Réponse apportée
Issue with removing space from char from loaded data
if you're only importing numeric data from those files, why not just use |dlmread| or |csvread| or |textread|. I'd personally pr...

plus de 8 ans il y a | 0

Réponse apportée
Need name of particular 'nth' sheets
use xlsinfo, [status,sheets] = xlsfinfo(filename) then |sheets| is a cell array with all the sheet names in your file. Si...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Display separate (X, Y) value matrices next to each other?
You may want to use uitable, <https://de.mathworks.com/help/matlab/ref/uitable.html> something like, f = figure; t =...

plus de 8 ans il y a | 0

Réponse apportée
How to do excel read inside 'matlab function' block in simulink?
You may want to use coder.extrinsic('xlsread') before you call xlsread in your block. read: <https://de.mathworks.com/...

plus de 8 ans il y a | 0

Réponse apportée
Is it possible to use a comma as decimal seperator in figures?
try this, xl = get(gca,'XTickLabel'); new_xl = strrep(xl(:),'.',','); set(gca,'XTickLabel',new_xl)

plus de 8 ans il y a | 3

| A accepté

Réponse apportée
Calculating values from string and displaying?
when you write EasyPracNumbers(:,2) you are accessing the second column. and that's why you get 3 elements. Perhaps you m...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Can I get the top view, side view and front view of following 3D plot in matlab figure editor?
use view <https://de.mathworks.com/help/matlab/ref/view.html> top view is, az = 0; el = 90; view(az, el); read ...

plus de 8 ans il y a | 1

Réponse apportée
How to upload a txt file to solve a function multiple instances at once?
I suppose you mean 5 different outputs since the function needs 6 inputs (6 columns), data = dlmread('filename.txt'); maxS...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How can I load a file to be plotted within a switch case scenario?
you need to import the file, something like data = dlmread(filename); then during your plot options, you can use this var...

plus de 8 ans il y a | 0

Réponse apportée
3D matrix with value of each point convert to .txt file
Why not save each page in separate files? It's much simpler, for k=1:size(yourMatrix, 3) A = yourMatrix(:,:,k); s...

plus de 8 ans il y a | 0

Réponse apportée
I created a csv file in which i created three column file, pixels and usage i want to create 3 folders.
|mkdir| creates a new folder <https://de.mathworks.com/help/matlab/ref/mkdir.html> usage example, for k=1:yourMax ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Summation of functions in a loop
I'm not quite clear, you probably want, A = @(x) sum((x-5).^2) If you really intend to create array of functions, then ...

plus de 8 ans il y a | 0

Réponse apportée
Naming figure with a loop
for k = 1:numel(D) f(k) = figure(k) h(k) = plot(...) title(['Doubling Time ' D{k}]) end

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Why is this error occuring in my code.
you're getting the error because you forgot to index B, C2(i) = B(i)*log2(1+min(i)) But anyway, what do you even mean by ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Undefined function highlight for input arguments of type digraph
You pass the *plot handle* P as the parameter to highlight. This is what I showed you yesterday. highlight(P,V,'EdgeColor','...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
find index and value of max value of larger array based on range provided by another array
Usually, when you use max, you can also extract the linear index of the maximum value, for example, [M,I] = max(your_array) ...

plus de 8 ans il y a | 0

Réponse apportée
Phase shift of three phase sinusoidal voltage?
Use the sin wave block and use the *"Phase"* field on the dialog box to modify your phase. <https://de.mathworks.com/help/sim...

plus de 8 ans il y a | 0

Réponse apportée
how to plot a 3d surface with a matrix
Something like this? x = 10:0.1:30; z = 1:0.01:3; [X,Z] = ndgrid(x,z); mesh(X,Z,M)

plus de 8 ans il y a | 1

Réponse apportée
How to catch numbers contained in a MAT file titles
I suppose you are using dir and then store all the mat file names in a cell array, then you could use, t = regexp(names,'[0-...

plus de 8 ans il y a | 0

Réponse apportée
How to set a range in a matrix to zero?
A([1:3-1 5+1:end]) = 0

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Create vector from row's table in opposite order
fliplr(yourtable{yourRow,:}) if you want to sort them instead of just flipping them like above, you should rather use, ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
For loop index problem
you have to use another variable name as iterator in your for loop for k = 1:size(all_data_sess1,1) %here use k to index...

plus de 8 ans il y a | 0

Charger plus