Réponse apportée
change datatype of x axes
Axes are not polymorphic--they require a given data type. You'll have to create two axes and select which to display depending ...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
Function with structure field syntax
"You can also call a method using dot notation....It is not necessary to pass the object explicitly as an argument when using d...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Insert zero in an array when a certain value is exceeded
U=T; U(SETT>175)=0;

presque 7 ans il y a | 0

Réponse apportée
How to extract text from string at the same location, one line above
Presuming have read the file into a string array, s, >> isOK=contains(s(find(contains(s,"12345"))-1),"999") isOK = logical...

presque 7 ans il y a | 0

Réponse apportée
how to set NaN values red in a figure ?
I guess you could interpolate to fill in the NaN locations and then scatter3 them on top of the surf w/ the red marker...otherwi...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Plotting data as a function of time
For the given description, yes. BUT, you should probably create your date vector as one of the datetime or duration class inste...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
Simple linear regression, prediction intervals behave strangely using predint
It's the use of the ''observation','on' for the simultaneous bounds that's causing the much wider prediction interval bounds. N...

presque 7 ans il y a | 0

Réponse apportée
How to find the mean peaks in positive axis
thresh=0; % or whatever level you wish pks = findpeaks(y,'MinPeakHeight',thresh); Read the doc carefully; findpeaks has all...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Combining multiple plot statements.
As is, the above code snippet leaves only the result of plot((1-sqrt(5)),0,'g^', 'MarkerFaceColor', 'g') on the figure because...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
MinPeakDistance ignoring some peaks it shouldn't
See <Answers 482540: Logic of findpeaks> for what's behind the cause for this. You'll have to modify your search pattern to loo...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
probem with FaceColor of bar
Carrying on from the above after defining data... clrs=[[1 0 0];[0 1 0];[1 1 1];[0 1 1];[0 0 1];[1 1 0];[0 0 0];[1 0 1]]; % rgb...

presque 7 ans il y a | 1

Réponse apportée
Plotting multipe lines with different width
Firstly, your time problem is that your A and B are the vectors of all points and you're plotting the whole thing every time by ...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
HOW TO CONVERT AN .OUT FILE TO .TXT FILE VIA MATLAB
There's nothing about the file content that is specific to the name including the extension. fn='yourfile.out'; [~,f]=filepar...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Using a for loop to iterate over rows of a matrix?
Alternatively, consider vectorizing the function instead of using a loop... function [Re, flow_type] = Reynolds(p,v,L,u) ...

presque 7 ans il y a | 0

Réponse apportée
How would I 'trim-the-fat' off of individual text files that are part of a loop?
" I'm going to have multiple files with arbitrary names, that need to be analyzed and concat[e]nated " Presuming this is relate...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Using the find function in a for-loop: Need to solve an error - "Unable to perform assignment because the left and right sides have a different number of elements"
find will return a variable number of outputs depending upon the inputs and you've written the code with the presumption of only...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Logic of find peaks function
As Adam says, the doc does explain... "When you specify a value for 'MinPeakDistance', the algorithm chooses the tallest peak i...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
Selecting data from an imported table
Presuming the data array is variable array x and it's the first column to explore... x=xlsread('yourfile.xls'); ix=find(diff(x...

presque 7 ans il y a | 0

Réponse apportée
How to append new data to a box and whisker plot
d=dir('*_01.mat'); v=[]; for i=1:length(d) V=[v load(d(i).name)]; end V=cell2mat(V); boxplot(V) from what you've told u...

presque 7 ans il y a | 0

Réponse apportée
What exactly is going on with this code? I'm having difficulty understanding it
"If you set the directory to the three fiels linked, you'll process them in about 30 seconds." I did set breakpoint in debugger...

presque 7 ans il y a | 0

Réponse apportée
Mark max value and min value with red circle
[~,imx]=max(y); [~,imn]=min(y); hold on plot(x([imn;imx]),y([imn;imx]),'or') or as I was going to do originally as noted in ...

presque 7 ans il y a | 2

| A accepté

Réponse apportée
How to add non-numerical axis values in 3D scatter plots?
lbls=num2str([1 2 5 8 10].','%d:1'); % build char array of desired tick labels xticklabels(lbls) % and...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to add errorbars
You forgot to add hold on before calling errorbar so that wiped out the barplot and then each subsequent call to it also will ha...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
How to use cellstr() without losing whitespace character?
Try the new string class... s=string(your_char_array); If you must end up with cellstr() array, then cast that result. s=cell...

presque 7 ans il y a | 0

Réponse apportée
Time format printing too much
I presume your complaint is the range label automagically shown for datetime axes. Seems there should be a way for user to turn...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
How to change the linewidth of the axes without affecting the linewidth of the legend box?
Use the two object handles to set their respective properties--although legend does inherit axes properties such as the linewidt...

presque 7 ans il y a | 1

| A accepté

Réponse apportée
Output argument "v" (and maybe others) not assigned during call to "Deflection_vmndangi".
None of the conditions will be met if you pass a vector as you have written the IF tests. IF is true iff (if and only if) all e...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
plus/minus inside fprinf statement
pmchar=char(177); fprintf(['The measured volume of %fmm^{3} ' pmchar '%fmm^{3} is equal to\nthe specified volume of %fmm^{3} ' ...

presque 7 ans il y a | 0

Réponse apportée
How can I Write a code that will allow a vector of positive integers in x, as a user input, to evaluate the equation listed below.For odd numbers we will use the following equation
x= input('\nPlease input a 5 values in vector notation:'); b=nan(size(x)); % initialize to something isodd=mod(x,2...

presque 7 ans il y a | 0

| A accepté

Réponse apportée
Do functions listen to global variables under while loops (Stopping functions)
pressure = readDevicepressure while pressure == 0 (x, y, z) = function(move the pressure reader to x,y,z) end only re...

presque 7 ans il y a | 0

| A accepté

Charger plus