can I conduce this command?
hello, I’m tring to save this string, but the format is the same and it seems weird to write the command like that…
x_1 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1),presi,w_n(1),presi,phi(1),presi,X(2),presi,w_n(2),presi,phi(2));
x_2 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1)*r(1),presi,w_n(1),presi,phi(1),presi,X(2)*r(2),presi,w_n(2),presi,phi(2));
there is a batter way to get this output?
The image below is markout of the output strings, beside the ‘cos’,’t’,'(/)’ the all is numbers thet I whold like that the user of the overall function will be able to determine with the variable pressi.
thank you
and sorry for my English 😚hello, I’m tring to save this string, but the format is the same and it seems weird to write the command like that…
x_1 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1),presi,w_n(1),presi,phi(1),presi,X(2),presi,w_n(2),presi,phi(2));
x_2 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1)*r(1),presi,w_n(1),presi,phi(1),presi,X(2)*r(2),presi,w_n(2),presi,phi(2));
there is a batter way to get this output?
The image below is markout of the output strings, beside the ‘cos’,’t’,'(/)’ the all is numbers thet I whold like that the user of the overall function will be able to determine with the variable pressi.
thank you
and sorry for my English 😚 hello, I’m tring to save this string, but the format is the same and it seems weird to write the command like that…
x_1 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1),presi,w_n(1),presi,phi(1),presi,X(2),presi,w_n(2),presi,phi(2));
x_2 = sprintf(‘%.*fcos(%.*ft+%.*f)+%.*fcos(%.*ft+%.*f)’,presi,X(1)*r(1),presi,w_n(1),presi,phi(1),presi,X(2)*r(2),presi,w_n(2),presi,phi(2));
there is a batter way to get this output?
The image below is markout of the output strings, beside the ‘cos’,’t’,'(/)’ the all is numbers thet I whold like that the user of the overall function will be able to determine with the variable pressi.
thank you
and sorry for my English 😚 sprintf, string, shortening MATLAB Answers — New Questions
​